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

#include <scene.h>

Inheritance diagram for mir::compositor::Scene:
[legend]

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

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

Member Function Documentation

virtual void mir::compositor::Scene::add_observer ( std::shared_ptr< scene::Observer > const &  observer)
pure virtual
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.

Implemented in mir::scene::SurfaceStack.

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

Implemented in mir::scene::SurfaceStack.

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

Implemented in mir::scene::SurfaceStack.

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 mc::SceneElements for the compositor id. The sequence is in stacking order from back to front.

Implemented in mir::scene::SurfaceStack.

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

Implemented in mir::scene::SurfaceStack.


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

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015