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

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015