Mir
platform.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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_PLATFORM_H_
20 #define MIR_GRAPHICS_ANDROID_PLATFORM_H_
21 
22 #include "mir/graphics/platform.h"
23 #include "device_quirks.h"
24 #include "overlay_optimization.h"
25 
26 namespace mir
27 {
28 namespace graphics
29 {
30 class DisplayReport;
31 namespace android
32 {
33 class GraphicBufferAllocator;
34 class FramebufferFactory;
35 class DisplayComponentFactory;
36 
38 {
39 public:
40  Platform(
41  std::shared_ptr<DisplayComponentFactory> const& display_buffer_builder,
42  std::shared_ptr<DisplayReport> const& display_report,
43  OverlayOptimization overlay_option);
44 
45  /* From Platform */
46  std::shared_ptr<graphics::GraphicBufferAllocator> create_buffer_allocator() override;
47  std::shared_ptr<Display> create_display(
48  std::shared_ptr<graphics::DisplayConfigurationPolicy> const&,
49  std::shared_ptr<graphics::GLProgramFactory> const&,
50  std::shared_ptr<graphics::GLConfig> const& /*gl_config*/) override;
51  std::shared_ptr<PlatformIpcOperations> make_ipc_operations() const override;
52  EGLNativeDisplayType egl_native_display() const override;
53 
54 private:
55  std::shared_ptr<Display> create_fb_backup_display();
56 
57  std::shared_ptr<GraphicBufferAllocator> create_mga_buffer_allocator();
58 
59  std::shared_ptr<DisplayComponentFactory> const display_buffer_builder;
60  std::shared_ptr<DisplayReport> const display_report;
61  std::shared_ptr<PlatformIpcOperations> const ipc_operations;
62  OverlayOptimization const overlay_option;
63  DeviceQuirks quirks{PropertiesOps{}};
64 };
65 
66 }
67 }
68 }
69 #endif /* MIR_GRAPHICS_ANDROID_PLATFORM_H_ */
All things Mir.
Definition: buffer_stream.h:37
Definition: platform.h:37
Interface to platform specific support for graphics operations.
Definition: platform.h:66
Definition: device_quirks.h:54
std::shared_ptr< PlatformIpcOperations > make_ipc_operations() const override
Creates an object capable of doing platform specific processing of buffers before they are sent or af...
Definition: platform.cpp:124
OverlayOptimization
Definition: overlay_optimization.h:28
std::shared_ptr< graphics::GraphicBufferAllocator > create_buffer_allocator() override
Creates the buffer allocator subsystem.
Definition: platform.cpp:92
Definition: device_quirks.h:45
Definition: android_input_receiver.h:32
std::shared_ptr< Display > create_display(std::shared_ptr< graphics::DisplayConfigurationPolicy > const &, std::shared_ptr< graphics::GLProgramFactory > const &, std::shared_ptr< graphics::GLConfig > const &) override
EGLNativeDisplayType egl_native_display() const override
Definition: platform.cpp:129

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