Mir
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 
24 #include "mir_toolkit/common.h"
25 #include "display_name.h"
26 #include <EGL/egl.h>
27 #include <list>
28 #include <chrono>
29 
30 namespace mir
31 {
32 namespace graphics
33 {
34 class Buffer;
35 class Renderable;
36 
37 namespace android
38 {
39 class RenderableListCompositor;
40 class SwappingGLContext;
41 class LayerList;
42 
44 {
50 };
51 
53 {
54 public:
55  virtual ~DisplayDevice() = default;
56 
57  /* \returns true if the DisplayDevice can support the renderlist
58  false if the display device cannot support drawing the given renderlist.
59  */
60  virtual bool compatible_renderlist(RenderableList const& renderlist) = 0;
61 
62  /* post the layer list to the display, optionally drawing using the context/compositor if
63  * instructed to by the driver
64  */
65  virtual void commit(std::list<DisplayContents> const& contents) = 0;
66 
67  //notify the DisplayDevice that the screen content was cleared in a way other than the above fns
68  virtual void content_cleared() = 0;
69 
70  virtual std::chrono::milliseconds recommended_sleep() const = 0;
71 
72 protected:
73  DisplayDevice() = default;
74  DisplayDevice& operator=(DisplayDevice const&) = delete;
75  DisplayDevice(DisplayDevice const&) = delete;
76 };
77 
78 }
79 }
80 }
81 
82 #endif /* MIR_GRAPHICS_ANDROID_DISPLAY_SUPPORT_PROVIDER_H_ */
geometry::Displacement list_offset
Definition: display_device.h:47
All things Mir.
Definition: atomic_callback.h:25
Definition: display_device.h:52
RenderableListCompositor & compositor
Definition: display_device.h:49
Definition: hwc_fallback_gl_renderer.h:39
virtual std::chrono::milliseconds recommended_sleep() const =0
Definition: swapping_gl_context.h:31
virtual void commit(std::list< DisplayContents > const &contents)=0
DisplayName
Definition: display_name.h:31
LayerList & list
Definition: display_device.h:46
Definition: displacement.h:32
Definition: hwc_layerlist.h:50
DisplayName name
Definition: display_device.h:45
virtual bool compatible_renderlist(RenderableList const &renderlist)=0
SwappingGLContext & context
Definition: display_device.h:48
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:79
DisplayDevice & operator=(DisplayDevice const &)=delete
Definition: android_input_receiver.h:36
Definition: display_device.h:43

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