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 
68  virtual bool overlay(RenderableList const& renderlist) = 0;
69 
78  virtual MirOrientation orientation() const = 0;
79 
89  virtual MirMirrorMode mirror_mode() const = 0;
90 
97  virtual NativeDisplayBuffer* native_display_buffer() = 0;
98 
99 protected:
100  DisplayBuffer() = default;
101  DisplayBuffer(DisplayBuffer const& c) = delete;
102  DisplayBuffer& operator=(DisplayBuffer const& c) = delete;
103 };
104 
105 }
106 }
107 
108 #endif /* MIR_GRAPHICS_DISPLAY_BUFFER_H_ */
Definition: as_render_target.h:27
Interface to an output framebuffer.
Definition: display_buffer.h:47
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:271
virtual ~NativeDisplayBuffer()=default
Definition: display_buffer.h:35
MirMirrorMode
Mirroring axis relative to the "natural" orientation of the display.
Definition: common.h:280
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:80
NativeDisplayBuffer operator=(NativeDisplayBuffer const &)=delete
Definition: rectangle.h:33

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:07:25 UTC 2017