Mir
display_buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_DISPLAY_BUFFER_H_
20 #define MIR_GRAPHICS_DISPLAY_BUFFER_H_
21 
22 #include <mir/geometry/rectangle.h>
24 #include <mir_toolkit/common.h>
25 
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace graphics
31 {
32 
33 class Buffer;
34 
36 {
37 protected:
38  NativeDisplayBuffer() = default;
39  virtual ~NativeDisplayBuffer() = default;
42 };
43 
48 {
49 public:
50  virtual ~DisplayBuffer() = default;
51 
53  virtual geometry::Rectangle view_area() const = 0;
54 
70  virtual bool post_renderables_if_optimizable(RenderableList const& renderlist) = 0;
71 
80  virtual MirOrientation orientation() const = 0;
81 
89 
90 protected:
91  DisplayBuffer() = default;
92  DisplayBuffer(DisplayBuffer const& c) = delete;
93  DisplayBuffer& operator=(DisplayBuffer const& c) = delete;
94 };
95 
96 }
97 }
98 
99 #endif /* MIR_GRAPHICS_DISPLAY_BUFFER_H_ */
All things Mir.
Definition: atomic_callback.h:25
Interface to an output framebuffer.
Definition: display_buffer.h:47
virtual ~DisplayBuffer()=default
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:164
virtual bool post_renderables_if_optimizable(RenderableList const &renderlist)=0
This will render renderlist to the screen and post the result to the screen if there is a hardware op...
virtual ~NativeDisplayBuffer()=default
Definition: display_buffer.h:35
virtual NativeDisplayBuffer * native_display_buffer()=0
Returns a pointer to the native display buffer object backing this display buffer.
virtual geometry::Rectangle view_area() const =0
The area the DisplayBuffer occupies in the virtual screen space.
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:79
NativeDisplayBuffer operator=(NativeDisplayBuffer const &)=delete
Definition: rectangle.h:33
DisplayBuffer & operator=(DisplayBuffer const &c)=delete
virtual MirOrientation orientation() const =0
Returns the orientation of the display buffer relative to how the user should see it (the orientation...

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015