19 #ifndef MIR_SCENE_SURFACE_STACK_H_
20 #define MIR_SCENE_SURFACE_STACK_H_
50 class RenderingTracker;
71 std::shared_ptr<SceneReport>
const& report);
80 void for_each(std::function<
void(std::shared_ptr<input::Surface>
const&)>
const& callback);
82 virtual void remove_surface(std::weak_ptr<Surface>
const& surface)
override;
84 virtual void raise(std::weak_ptr<Surface>
const& surface)
override;
87 std::shared_ptr<Surface>
const& surface,
91 void add_observer(std::shared_ptr<Observer>
const& observer)
override;
103 void create_rendering_tracker_for(std::shared_ptr<Surface>
const&);
104 void update_rendering_tracker_compositors();
106 std::mutex
mutable guard;
108 std::shared_ptr<InputRegistrar>
const input_registrar;
109 std::shared_ptr<SceneReport>
const report;
111 typedef std::vector<std::shared_ptr<Surface>> Layer;
112 std::map<DepthId, Layer> layers_by_depth;
113 std::map<Surface*,std::shared_ptr<RenderingTracker>> rendering_trackers;
114 std::set<compositor::CompositorID> registered_compositors;
116 std::vector<std::shared_ptr<graphics::Renderable>> overlays;
All things Mir.
Definition: aging_buffer.h:24
Definition: surface_stack_model.h:34
void for_each(std::function< void(std::shared_ptr< input::Surface > const &)> const &callback)
Definition: surface_stack.cpp:239
void surface_added(Surface *surface) override
Definition: surface_stack.cpp:321
Definition: hwc_layers.h:45
Definition: surface_stack.h:67
void remove_input_visualization(std::weak_ptr< graphics::Renderable > const &overlay)
Definition: surface_stack.cpp:169
void surface_removed(Surface *surface) override
Definition: surface_stack.cpp:327
An observer for top level notifications of scene changes. In order to receive more granular change no...
Definition: observer.h:33
void emit_scene_changed() override
Definition: surface_stack.cpp:186
void add_observer(std::shared_ptr< Observer > const &observer) override
Definition: surface_stack.cpp:295
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:207
true
Definition: display_configuration.cpp:30
SurfaceStack(std::shared_ptr< SceneReport > const &report)
Definition: surface_stack.cpp:114
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:120
void unregister_compositor(compositor::CompositorID id) override
Definition: surface_stack.cpp:150
Definition: surface_stack.h:52
virtual ~SurfaceStack() noexcept(true)
Definition: surface_stack.h:72
void end_observation()
Definition: surface_stack.cpp:351
void remove_observer(std::weak_ptr< Observer > const &observer) override
Definition: surface_stack.cpp:310
void const * CompositorID
Definition: compositor_id.h:27
Definition: basic_observers.h:30
void surface_exists(Surface *surface) override
Definition: surface_stack.cpp:345
void surfaces_reordered() override
Definition: surface_stack.cpp:333
void add_input_visualization(std::shared_ptr< graphics::Renderable > const &overlay)
Definition: surface_stack.cpp:159
void add_surface(std::shared_ptr< Surface > const &surface, DepthId depth, input::InputReceptionMode input_mode) override
Definition: surface_stack.cpp:191
void register_compositor(compositor::CompositorID id) override
Definition: surface_stack.cpp:141
void scene_changed() override
Definition: surface_stack.cpp:339