Mir
fb_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 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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_FB_DEVICE_H_
20 #define MIR_GRAPHICS_ANDROID_FB_DEVICE_H_
21 
22 #include "display_device.h"
23 #include "hwc_configuration.h"
24 #include <hardware/gralloc.h>
25 #include <hardware/fb.h>
26 
27 namespace mir
28 {
29 namespace graphics
30 {
31 namespace android
32 {
33 
35 {
36 public:
37  FbControl(std::shared_ptr<framebuffer_device_t> const& fbdev);
38  void power_mode(DisplayName, MirPowerMode) override;
40  ConfigChangeSubscription subscribe_to_config_changes(std::function<void()> const& cb) override;
41 private:
42  std::shared_ptr<framebuffer_device_t> const fb_device;
43 };
44 
45 class FBDevice : public DisplayDevice
46 {
47 public:
48  FBDevice(std::shared_ptr<framebuffer_device_t> const& fbdev);
49 
50  bool compatible_renderlist(RenderableList const& renderlist) override;
51  void commit(
53  LayerList&,
54  SwappingGLContext const& context,
55  RenderableListCompositor const& list_compositor) override;
56 
57 private:
58  std::shared_ptr<framebuffer_device_t> const fb_device;
59  void content_cleared() override;
60 };
61 
62 }
63 }
64 }
65 #endif /* MIR_GRAPHICS_ANDROID_FB_DEVICE_H_ */
All things Mir.
Definition: buffer_stream.h:37
ConfigChangeSubscription subscribe_to_config_changes(std::function< void()> const &cb) override
Definition: fb_device.cpp:70
Definition: display_device.h:40
bool compatible_renderlist(RenderableList const &renderlist) override
Definition: fb_device.cpp:96
Definition: hwc_fallback_gl_renderer.h:38
Definition: fb_device.h:45
DisplayAttribs active_attribs_for(DisplayName) override
Definition: fb_device.cpp:56
Definition: swapping_gl_context.h:31
std::shared_ptr< void > ConfigChangeSubscription
Definition: hwc_configuration.h:45
Definition: hwc_configuration.h:47
FbControl(std::shared_ptr< framebuffer_device_t > const &fbdev)
Definition: fb_device.cpp:36
DisplayName
Definition: display_name.h:31
std::list< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:80
Definition: fb_device.h:34
MirPowerMode
Definition: common.h:103
Definition: hwc_configuration.h:35
Definition: hwc_layerlist.h:49
void power_mode(DisplayName, MirPowerMode) override
Definition: fb_device.cpp:43
FBDevice(std::shared_ptr< framebuffer_device_t > const &fbdev)
Definition: fb_device.cpp:75
Definition: android_input_receiver.h:32
void commit(DisplayName, LayerList &, SwappingGLContext const &context, RenderableListCompositor const &list_compositor) override
Definition: fb_device.cpp:80

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