Mir
hal_component_factory.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_HAL_COMPONENT_FACTORY_H_
20 #define MIR_GRAPHICS_ANDROID_HAL_COMPONENT_FACTORY_H_
21 
24 
25 namespace mir
26 {
27 namespace graphics
28 {
29 class DisplayReport;
30 namespace android
31 {
32 class FramebufferBundle;
33 class DisplayResourceFactory;
34 class GraphicBufferAllocator;
35 class DisplayDevice;
36 class HwcWrapper;
37 class HwcReport;
38 
39 //NOTE: this should be the only class that inspects the HWC version and assembles
40 //the components accordingly
42 {
43 public:
45  std::shared_ptr<GraphicBufferAllocator> const& buffer_allocator,
46  std::shared_ptr<DisplayResourceFactory> const& res_factory,
47  std::shared_ptr<HwcReport> const& hwc_report);
48 
49  std::unique_ptr<FramebufferBundle> create_framebuffers(DisplayAttribs const&) override;
50  std::unique_ptr<DisplayDevice> create_display_device() override;
51  std::unique_ptr<HwcConfiguration> create_hwc_configuration() override;
52  std::unique_ptr<LayerList> create_layer_list() override;
53 
54 private:
55  std::shared_ptr<GraphicBufferAllocator> const buffer_allocator;
56  std::shared_ptr<DisplayResourceFactory> const res_factory;
57  std::shared_ptr<HwcReport> const hwc_report;
58 
59  std::shared_ptr<FramebufferBundle> framebuffers;
60  bool force_backup_display;
61 
62  std::shared_ptr<HwcWrapper> hwc_wrapper;
63  std::shared_ptr<framebuffer_device_t> fb_native;
64  HwcVersion hwc_version;
65 };
66 
67 }
68 }
69 }
70 
71 #endif /* MIR_GRAPHICS_ANDROID_HAL_COMPONENT_FACTORY_H_ */
All things Mir.
Definition: buffer_stream.h:37
std::unique_ptr< FramebufferBundle > create_framebuffers(DisplayAttribs const &) override
Definition: hal_component_factory.cpp:66
HalComponentFactory(std::shared_ptr< GraphicBufferAllocator > const &buffer_allocator, std::shared_ptr< DisplayResourceFactory > const &res_factory, std::shared_ptr< HwcReport > const &hwc_report)
Definition: hal_component_factory.cpp:43
Definition: hal_component_factory.h:41
std::unique_ptr< LayerList > create_layer_list() override
Definition: hal_component_factory.cpp:75
Definition: display_component_factory.h:36
std::unique_ptr< DisplayDevice > create_display_device() override
Definition: hal_component_factory.cpp:95
Definition: hwc_configuration.h:35
Definition: android_input_receiver.h:32
HwcVersion
Definition: display_resource_factory.h:42
std::unique_ptr< HwcConfiguration > create_hwc_configuration() override
Definition: hal_component_factory.cpp:126

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