Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
display_device.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
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * 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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_DISPLAY_SUPPORT_PROVIDER_H_
20 #define MIR_GRAPHICS_ANDROID_DISPLAY_SUPPORT_PROVIDER_H_
21 
23 #include "mir_toolkit/common.h"
24 #include <EGL/egl.h>
25 #include <list>
26 
27 namespace mir
28 {
29 namespace graphics
30 {
31 class Buffer;
32 class Renderable;
33 
34 namespace android
35 {
36 class SwappingGLContext;
37 
38 class DisplayDevice
39 {
40 public:
41  virtual ~DisplayDevice() = default;
42 
43  virtual void mode(MirPowerMode mode) = 0;
44  virtual void render_gl(SwappingGLContext const& context) = 0;
45  virtual void render_gl_and_overlays(
46  SwappingGLContext const& context,
47  RenderableList const& list,
48  std::function<void(Renderable const&)> const& render_fn) = 0;
49  virtual void post(Buffer const& buffer) = 0;
50  virtual bool apply_orientation(MirOrientation orientation) const = 0;
51 
52 protected:
53  DisplayDevice() = default;
54  DisplayDevice& operator=(DisplayDevice const&) = delete;
55  DisplayDevice(DisplayDevice const&) = delete;
56 };
57 
58 }
59 }
60 }
61 
62 #endif /* MIR_GRAPHICS_ANDROID_DISPLAY_SUPPORT_PROVIDER_H_ */
MirOrientation
Definition: common.h:113
std::list< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:88
MirPowerMode
Definition: common.h:82

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