Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
output_builder.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: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_OUTPUT_BUILDER_H_
20 #define MIR_GRAPHICS_ANDROID_OUTPUT_BUILDER_H_
21 
22 #include "display_builder.h"
23 #include "overlay_optimization.h"
24 #include "hardware/hwcomposer.h"
25 #include "hardware/fb.h"
26 
27 namespace mir
28 {
29 namespace graphics
30 {
31 class DisplayReport;
32 namespace android
33 {
34 class FramebufferBundle;
35 class DisplayResourceFactory;
36 class GraphicBufferAllocator;
37 class DisplayDevice;
38 class HwcWrapper;
39 class HwcLogger;
40 
42 {
43 public:
45  std::shared_ptr<GraphicBufferAllocator> const& buffer_allocator,
46  std::shared_ptr<DisplayResourceFactory> const& res_factory,
47  std::shared_ptr<DisplayReport> const& display_report,
48  OverlayOptimization overlay_option,
49  std::shared_ptr<HwcLogger> const& logger);
50 
52  std::unique_ptr<ConfigurableDisplayBuffer> create_display_buffer(
53  GLProgramFactory const& gl_program_factory,
54  GLContext const& gl_context);
55 
56 private:
57  std::shared_ptr<GraphicBufferAllocator> const buffer_allocator;
58  std::shared_ptr<DisplayResourceFactory> const res_factory;
59  std::shared_ptr<DisplayReport> const display_report;
60 
61  std::shared_ptr<FramebufferBundle> framebuffers;
62  bool force_backup_display;
63 
64  std::shared_ptr<HwcWrapper> hwc_wrapper;
65  std::shared_ptr<hwc_composer_device_1> hwc_native;
66  std::shared_ptr<framebuffer_device_t> fb_native;
67  OverlayOptimization overlay_optimization;
68 };
69 
70 }
71 }
72 }
73 
74 #endif /* MIR_GRAPHICS_ANDROID_OUTPUT_BUILDER_H_ */
All things Mir.
Definition: aging_buffer.h:24
Definition: gl_context.h:40
std::unique_ptr< ConfigurableDisplayBuffer > create_display_buffer(GLProgramFactory const &gl_program_factory, GLContext const &gl_context)
Definition: output_builder.cpp:75
Definition: display_builder.h:35
Definition: gl_program_factory.h:31
OverlayOptimization
Definition: overlay_optimization.h:28
OutputBuilder(std::shared_ptr< GraphicBufferAllocator > const &buffer_allocator, std::shared_ptr< DisplayResourceFactory > const &res_factory, std::shared_ptr< DisplayReport > const &display_report, OverlayOptimization overlay_option, std::shared_ptr< HwcLogger > const &logger)
Definition: output_builder.cpp:35
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:119
Definition: android_input_receiver.h:32
MirPixelFormat display_format()
Definition: output_builder.cpp:70
Definition: output_builder.h:41

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014