Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 swap_client_buffers(graphics::Buffer* old_buffer, std::function<void(graphics::Buffer* new_buffer)> complete) override;
43 
44  std::shared_ptr<graphics::Buffer>
45  lock_compositor_buffer(void const* user_id) override;
46  std::shared_ptr<graphics::Buffer> lock_snapshot_buffer() override;
47 
49  geometry::Size stream_size() override;
50  void resize(geometry::Size const& size) override;
51  void allow_framedropping(bool) override;
52  void force_requests_to_complete() override;
53  int buffers_ready_for_compositor() const override;
54 
55 protected:
58 
59 private:
60  std::shared_ptr<BufferBundle> const buffer_bundle;
61 };
62 
63 }
64 }
65 
66 #endif /* MIR_COMPOSITOR_BUFFER_STREAM_SCENE_H_ */
Definition: size.h:30
Definition: buffer_stream.h:39
Definition: buffer_stream_surfaces.h:36
void allow_framedropping(bool) override
Definition: buffer_stream_surfaces.cpp:82
void swap_client_buffers(graphics::Buffer *old_buffer, std::function< void(graphics::Buffer *new_buffer)> complete) override
Definition: buffer_stream_surfaces.cpp:52
void force_requests_to_complete() override
Definition: buffer_stream_surfaces.cpp:77
geometry::Size stream_size() override
Definition: buffer_stream_surfaces.cpp:67
void resize(geometry::Size const &size) override
Definition: buffer_stream_surfaces.cpp:72
~BufferStreamSurfaces()
Definition: buffer_stream_surfaces.cpp:35
MirPixelFormat get_stream_pixel_format() override
Definition: buffer_stream_surfaces.cpp:62
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:99
BufferStreamSurfaces & operator=(const BufferStreamSurfaces &)=delete
std::shared_ptr< graphics::Buffer > lock_snapshot_buffer() override
Definition: buffer_stream_surfaces.cpp:47
int buffers_ready_for_compositor() const override
Definition: buffer_stream_surfaces.cpp:87
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:50

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014