Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
temporary_buffers.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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_
20 #define MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_
21 
22 #include "mir/graphics/buffer.h"
23 #include "mir/graphics/buffer_id.h"
24 
25 namespace mg = mir::graphics;
26 
27 namespace mir
28 {
29 namespace compositor
30 {
31 
32 class BufferBundle;
33 class BackBufferStrategy;
34 
36 {
37 public:
38  geometry::Size size() const;
39  geometry::Stride stride() const;
41  mg::BufferID id() const;
42  void gl_bind_to_texture() override;
43  std::shared_ptr<mg::NativeBuffer> native_buffer_handle() const;
44  bool can_bypass() const override;
45 
46 protected:
47  explicit TemporaryBuffer(std::shared_ptr<mg::Buffer> const& real_buffer);
48  std::shared_ptr<mg::Buffer> const buffer;
49 };
50 
52 {
53 public:
55  std::shared_ptr<BufferBundle> const& bun, void const* user_id);
57 
58 private:
59  std::shared_ptr<BufferBundle> const bundle;
60 };
61 
63 {
64 public:
65  explicit TemporarySnapshotBuffer(
66  std::shared_ptr<BufferBundle> const& bun);
68 
69 private:
70  std::shared_ptr<BufferBundle> const bundle;
71 };
72 
73 }
74 }
75 
76 #endif /* MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_ */
Definition: size.h:30
Definition: temporary_buffers.h:35
All things Mir.
Definition: aging_buffer.h:24
std::shared_ptr< mg::Buffer > const buffer
Definition: temporary_buffers.h:48
geometry::Size size() const
Definition: temporary_buffers.cpp:55
~TemporarySnapshotBuffer()
Definition: temporary_buffers.cpp:50
std::shared_ptr< mg::NativeBuffer > native_buffer_handle() const
Definition: temporary_buffers.cpp:80
bool can_bypass() const override
Definition: temporary_buffers.cpp:85
Graphics subsystem. Mediates interaction between core system and the graphics environment.
Definition: client_surface_interpreter.h:27
geometry::Stride stride() const
Definition: temporary_buffers.cpp:60
Definition: temporary_buffers.h:51
Definition: temporary_buffers.h:62
TemporaryBuffer(std::shared_ptr< mg::Buffer > const &real_buffer)
Definition: temporary_buffers.cpp:26
TemporaryCompositorBuffer(std::shared_ptr< BufferBundle > const &bun, void const *user_id)
Definition: temporary_buffers.cpp:31
void gl_bind_to_texture() override
Definition: temporary_buffers.cpp:75
TemporarySnapshotBuffer(std::shared_ptr< BufferBundle > const &bun)
Definition: temporary_buffers.cpp:43
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:119
~TemporaryCompositorBuffer()
Definition: temporary_buffers.cpp:38
mg::BufferID id() const
Definition: temporary_buffers.cpp:70
MirPixelFormat pixel_format() const
Definition: temporary_buffers.cpp:65
Definition: buffer.h:34
Definition: dimensions.h:38

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014