Mir
hwc_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_HWC_DEVICE_H_
20 #define MIR_GRAPHICS_ANDROID_HWC_DEVICE_H_
21 
22 #include "mir_toolkit/common.h"
24 #include "display_device.h"
25 #include "hwc_layerlist.h"
26 #include <memory>
27 #include <vector>
28 
29 namespace mir
30 {
31 namespace graphics
32 {
33 class Buffer;
34 
35 namespace android
36 {
37 class SyncFileOps;
38 class HwcWrapper;
39 class HwcConfiguration;
40 
41 class HwcDevice : public DisplayDevice
42 {
43 public:
44  HwcDevice(std::shared_ptr<HwcWrapper> const& hwc_wrapper);
45 
46  bool compatible_renderlist(RenderableList const& renderlist) override;
47  void commit(
49  LayerList&,
50  SwappingGLContext const& context,
51  RenderableListCompositor const& list_compositor) override;
52  void content_cleared() override;
53 
54 private:
55  bool buffer_is_onscreen(Buffer const&) const;
56  std::vector<std::shared_ptr<Buffer>> onscreen_overlay_buffers;
57 
58  std::shared_ptr<HwcWrapper> const hwc_wrapper;
59  std::shared_ptr<SyncFileOps> const sync_ops;
60 };
61 
62 }
63 }
64 }
65 
66 #endif /* MIR_GRAPHICS_ANDROID_HWC_DEVICE_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
bool compatible_renderlist(RenderableList const &renderlist) override
Definition: hwc_device.cpp:46
void commit(DisplayName, LayerList &, SwappingGLContext const &context, RenderableListCompositor const &list_compositor) override
Definition: hwc_device.cpp:82
void content_cleared() override
Definition: hwc_device.cpp:125
HwcDevice(std::shared_ptr< HwcWrapper > const &hwc_wrapper)
Definition: hwc_device.cpp:64
DisplayName
Definition: display_name.h:31
std::list< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:80
Definition: hwc_device.h:41
Definition: hwc_layerlist.h:49
Definition: buffer.h:45
Definition: android_input_receiver.h:32

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