Mir
buffer_stream_surfaces.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by:
17  * Kevin DuBois <kevin.dubois@canonical.com>
18  */
19 
20 #ifndef MIR_COMPOSITOR_BUFFER_STREAM_SCENE_H_
21 #define MIR_COMPOSITOR_BUFFER_STREAM_SCENE_H_
22 
24 
25 #include <mutex>
26 
27 namespace mir
28 {
29 namespace compositor
30 {
31 
32 class BufferIDUniqueGenerator;
33 class BufferBundle;
34 class BackBufferStrategy;
35 
37 {
38 public:
39  BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper);
41 
42  void acquire_client_buffer(std::function<void(graphics::Buffer* buffer)> complete) override;
43  void release_client_buffer(graphics::Buffer* buf) override;
44 
45  std::shared_ptr<graphics::Buffer>
46  lock_compositor_buffer(void const* user_id) override;
47  std::shared_ptr<graphics::Buffer> lock_snapshot_buffer() override;
48 
50  geometry::Size stream_size() override;
51  void resize(geometry::Size const& size) override;
52  void allow_framedropping(bool) override;
53  void force_requests_to_complete() override;
54  int buffers_ready_for_compositor(void const* user_id) const override;
55  void drop_old_buffers() override;
56  void drop_client_requests() override;
57 
58 protected:
61 
62 private:
63  std::shared_ptr<BufferBundle> const buffer_bundle;
64 };
65 
66 }
67 }
68 
69 #endif /* MIR_COMPOSITOR_BUFFER_STREAM_SCENE_H_ */
Definition: size.h:30
void release_client_buffer(graphics::Buffer *buf) override
Definition: buffer_stream_surfaces.cpp:58
All things Mir.
Definition: buffer_stream.h:37
int buffers_ready_for_compositor(void const *user_id) const override
Definition: buffer_stream_surfaces.cpp:88
Definition: buffer_stream.h:39
Definition: buffer_stream_surfaces.h:36
void allow_framedropping(bool) override
Definition: buffer_stream_surfaces.cpp:83
void force_requests_to_complete() override
Definition: buffer_stream_surfaces.cpp:78
geometry::Size stream_size() override
Definition: buffer_stream_surfaces.cpp:68
void resize(geometry::Size const &size) override
Definition: buffer_stream_surfaces.cpp:73
~BufferStreamSurfaces()
Definition: buffer_stream_surfaces.cpp:35
MirPixelFormat get_stream_pixel_format() override
Definition: buffer_stream_surfaces.cpp:63
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:127
void drop_client_requests() override
Definition: buffer_stream_surfaces.cpp:98
BufferStreamSurfaces & operator=(const BufferStreamSurfaces &)=delete
void acquire_client_buffer(std::function< void(graphics::Buffer *buffer)> complete) override
Definition: buffer_stream_surfaces.cpp:52
std::shared_ptr< graphics::Buffer > lock_snapshot_buffer() override
Definition: buffer_stream_surfaces.cpp:47
Definition: buffer.h:34
std::shared_ptr< graphics::Buffer > lock_compositor_buffer(void const *user_id) override
Definition: buffer_stream_surfaces.cpp:40
BufferStreamSurfaces(std::shared_ptr< BufferBundle > const &swapper)
Definition: buffer_stream_surfaces.cpp:30
int const size
Definition: make_socket_rpc_channel.cpp:51
void drop_old_buffers() override
Definition: buffer_stream_surfaces.cpp:93

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015