19 #ifndef MIR_SCENE_SURFACE_STACK_H_
20 #define MIR_SCENE_SURFACE_STACK_H_
50 class RenderingTracker;
71 std::shared_ptr<SceneReport>
const& report);
81 void for_each(std::function<
void(std::shared_ptr<input::Surface>
const&)>
const& callback)
override;
83 virtual void remove_surface(std::weak_ptr<Surface>
const& surface)
override;
85 virtual void raise(std::weak_ptr<Surface>
const& surface)
override;
88 std::shared_ptr<Surface>
const& surface,
92 void add_observer(std::shared_ptr<Observer>
const& observer)
override;
104 void create_rendering_tracker_for(std::shared_ptr<Surface>
const&);
105 void update_rendering_tracker_compositors();
107 std::mutex
mutable guard;
109 std::shared_ptr<InputRegistrar>
const input_registrar;
110 std::shared_ptr<SceneReport>
const report;
112 typedef std::vector<std::shared_ptr<Surface>> Layer;
113 std::map<DepthId, Layer> layers_by_depth;
114 std::map<Surface*,std::shared_ptr<RenderingTracker>> rendering_trackers;
115 std::set<compositor::CompositorID> registered_compositors;
117 std::vector<std::shared_ptr<graphics::Renderable>> overlays;
120 bool scene_changed =
false;
All things Mir.
Definition: buffer_stream.h:37
Definition: surface_stack_model.h:34
void surface_added(Surface *surface) override
Definition: surface_stack.cpp:358
Definition: hwc_layers.h:45
Definition: surface_stack.h:67
void surface_removed(Surface *surface) override
Definition: surface_stack.cpp:364
int frames_pending(compositor::CompositorID) const override
Return the number of additional frames that you need to render to get fully up to date with the lates...
Definition: surface_stack.cpp:151
An observer for top level notifications of scene changes. In order to receive more granular change no...
Definition: observer.h:33
void for_each(std::function< void(std::shared_ptr< input::Surface > const &)> const &callback) override
Definition: surface_stack.cpp:276
void emit_scene_changed() override
Definition: surface_stack.cpp:219
void add_input_visualization(std::shared_ptr< graphics::Renderable > const &overlay) override
Definition: surface_stack.cpp:192
void add_observer(std::shared_ptr< Observer > const &observer) override
Definition: surface_stack.cpp:332
std::vector< std::shared_ptr< SceneElement >> SceneElementSequence
Definition: scene.h:38
virtual void remove_surface(std::weak_ptr< Surface > const &surface) override
Definition: surface_stack.cpp:244
true
Definition: display_configuration.cpp:30
SurfaceStack(std::shared_ptr< SceneReport > const &report)
Definition: surface_stack.cpp:118
compositor::SceneElementSequence scene_elements_for(compositor::CompositorID id) override
Generate a valid sequence of scene elements based on the current state of the Scene.
Definition: surface_stack.cpp:124
void unregister_compositor(compositor::CompositorID id) override
Definition: surface_stack.cpp:183
Definition: surface_stack.h:52
virtual ~SurfaceStack() noexcept(true)
Definition: surface_stack.h:72
void remove_input_visualization(std::weak_ptr< graphics::Renderable > const &overlay) override
Definition: surface_stack.cpp:202
void remove_observer(std::weak_ptr< Observer > const &observer) override
Definition: surface_stack.cpp:347
void const * CompositorID
Definition: compositor_id.h:27
Definition: basic_observers.h:28
void end_observation() override
Definition: surface_stack.cpp:388
void surface_exists(Surface *surface) override
Definition: surface_stack.cpp:382
void surfaces_reordered() override
Definition: surface_stack.cpp:370
void add_surface(std::shared_ptr< Surface > const &surface, DepthId depth, input::InputReceptionMode input_mode) override
Definition: surface_stack.cpp:228
void register_compositor(compositor::CompositorID id) override
Definition: surface_stack.cpp:174
void scene_changed() override
Definition: surface_stack.cpp:376