19 #ifndef MIR_SCENE_APPLICATION_SESSION_H_ 20 #define MIR_SCENE_APPLICATION_SESSION_H_ 37 namespace compositor {
class BufferStream; }
40 class DisplayConfiguration;
41 class GraphicBufferAllocator;
43 namespace shell {
class SurfaceStack; }
46 class SessionListener;
48 class SnapshotStrategy;
49 class BufferStreamFactory;
56 std::shared_ptr<shell::SurfaceStack>
const& surface_stack,
57 std::shared_ptr<SurfaceFactory>
const& surface_factory,
58 std::shared_ptr<BufferStreamFactory>
const& buffer_stream_factory,
61 std::shared_ptr<SnapshotStrategy>
const& snapshot_strategy,
62 std::shared_ptr<SessionListener>
const& session_listener,
64 std::shared_ptr<frontend::EventSink>
const& sink,
65 std::shared_ptr<graphics::GraphicBufferAllocator>
const& allocator);
71 std::shared_ptr<frontend::EventSink>
const& surface_sink)
override;
75 std::shared_ptr<Surface> surface_after(std::shared_ptr<Surface>
const&)
const override;
78 std::shared_ptr<Surface> default_surface()
const override;
81 pid_t process_id()
const override;
83 void drop_outstanding_requests()
override;
89 void send_input_device_change(std::vector<std::shared_ptr<input::Device>>
const& devices)
override;
93 void start_prompt_session()
override;
94 void stop_prompt_session()
override;
95 void suspend_prompt_session()
override;
96 void resume_prompt_session()
override;
101 void configure_streams(
Surface& surface, std::vector<shell::StreamSpecification>
const& config)
override;
102 void destroy_surface(std::weak_ptr<Surface>
const& surface)
override;
112 std::shared_ptr<shell::SurfaceStack>
const surface_stack;
113 std::shared_ptr<SurfaceFactory>
const surface_factory;
114 std::shared_ptr<BufferStreamFactory>
const buffer_stream_factory;
117 std::shared_ptr<SnapshotStrategy>
const snapshot_strategy;
118 std::shared_ptr<SessionListener>
const session_listener;
119 std::shared_ptr<frontend::EventSink>
const event_sink;
120 std::shared_ptr<frontend::ClientBuffers>
const buffers;
124 std::atomic<int> next_surface_id;
128 typedef std::map<frontend::SurfaceId, std::shared_ptr<Surface>> Surfaces;
129 typedef std::map<frontend::BufferStreamId, std::shared_ptr<compositor::BufferStream>> Streams;
132 std::mutex
mutable surfaces_and_streams_mutex;
136 std::map<frontend::SurfaceId, frontend::BufferStreamId> default_content_map;
138 void destroy_surface(std::unique_lock<std::mutex>& lock, Surfaces::const_iterator in_surfaces);
144 #endif // MIR_SCENE_APPLICATION_SESSION_H_ All things Mir.
Definition: atomic_callback.h:25
std::function< void(Snapshot const &)> SnapshotCallback
Definition: snapshot.h:39
Definition: application_session.h:52
Definition: surface_creation_parameters.h:41
Buffer creation properties.
Definition: buffer_properties.h:48
Definition: output_properties_cache.h:44
Interface to a configuration of display cards and outputs.
Definition: display_configuration.h:168