Mir
Public Member Functions | Protected Member Functions | List of all members
mir::compositor::Scene Class Referenceabstract

#include <scene.h>

Public Member Functions

virtual ~Scene ()
 
virtual SceneElementSequence scene_elements_for (CompositorID id)=0
 Generate a valid sequence of scene elements based on the current state of the Scene. More...
 
virtual int frames_pending (CompositorID id) const =0
 Return the number of additional frames that you need to render to get fully up to date with the latest data in the scene. More...
 
virtual void register_compositor (CompositorID id)=0
 
virtual void unregister_compositor (CompositorID id)=0
 
virtual void add_observer (std::shared_ptr< scene::Observer > const &observer)=0
 
virtual void remove_observer (std::weak_ptr< scene::Observer > const &observer)=0
 

Protected Member Functions

 Scene ()=default
 

Constructor & Destructor Documentation

◆ ~Scene()

virtual mir::compositor::Scene::~Scene ( )
inlinevirtual

◆ Scene()

mir::compositor::Scene::Scene ( )
protecteddefault

Member Function Documentation

◆ add_observer()

virtual void mir::compositor::Scene::add_observer ( std::shared_ptr< scene::Observer > const &  observer)
pure virtual

◆ frames_pending()

virtual int mir::compositor::Scene::frames_pending ( CompositorID  id) const
pure virtual

Return the number of additional frames that you need to render to get fully up to date with the latest data in the scene.

For a generic "scene change" this will be just 1. For surfaces that have multiple frames queued up however, it could be greater than 1. When the result reaches zero, you know you have consumed all the latest data from the scene.

◆ register_compositor()

virtual void mir::compositor::Scene::register_compositor ( CompositorID  id)
pure virtual

◆ remove_observer()

virtual void mir::compositor::Scene::remove_observer ( std::weak_ptr< scene::Observer > const &  observer)
pure virtual

◆ scene_elements_for()

virtual SceneElementSequence mir::compositor::Scene::scene_elements_for ( CompositorID  id)
pure virtual

Generate a valid sequence of scene elements based on the current state of the Scene.

Parameters
[in]idAn arbitrary unique identifier used to distinguish separate compositors which need to receive a sequence for rendering. Calling with the same id will return a new (different) sequence to that user each time. For consistency, all callers need to determine their id in the same way (e.g. always use "this" pointer).
Returns
a sequence of SceneElements for the compositor id. The sequence is in stacking order from back to front.

◆ unregister_compositor()

virtual void mir::compositor::Scene::unregister_compositor ( CompositorID  id)
pure virtual

The documentation for this class was generated from the following file:

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Mar 27 12:06:55 UTC 2017