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 class CommandStreamSyncFactory;
37 
39 {
40 public:
41  Platform(
42  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
43  std::shared_ptr<DisplayComponentFactory> const& display_buffer_builder,
44  std::shared_ptr<DisplayReport> const& display_report,
45  OverlayOptimization overlay_option,
46  std::shared_ptr<DeviceQuirks> const& quirks);
47 
48  /* From Platform */
51  std::shared_ptr<graphics::DisplayConfigurationPolicy> const&,
52  std::shared_ptr<graphics::GLConfig> const& /*gl_config*/) override;
54  EGLNativeDisplayType egl_native_display() const override;
55 
56 private:
57  std::shared_ptr<graphics::GraphicBufferAllocator> const buffer_allocator;
58  std::shared_ptr<DisplayComponentFactory> const display_buffer_builder;
59  std::shared_ptr<DisplayReport> const display_report;
60  std::shared_ptr<PlatformIpcOperations> const ipc_operations;
61  std::shared_ptr<DeviceQuirks> const quirks;
62  OverlayOptimization const overlay_option;
63 
64 };
65 
66 }
67 }
68 }
69 #endif /* MIR_GRAPHICS_ANDROID_PLATFORM_H_ */
All things Mir.
Definition: atomic_callback.h:25
Definition: platform.h:38
Interface to platform specific support for graphics operations.
Definition: platform.h:66
UniqueModulePtr< 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:136
std::unique_ptr< T, ModuleDeleter< T >> UniqueModulePtr
Use UniqueModulePtr to ensure that your loadable libray outlives instances created within it...
Definition: module_deleter.h:83
OverlayOptimization
Definition: overlay_optimization.h:28
UniqueModulePtr< Display > create_display(std::shared_ptr< graphics::DisplayConfigurationPolicy > const &, std::shared_ptr< graphics::GLConfig > const &) override
UniqueModulePtr< graphics::GraphicBufferAllocator > create_buffer_allocator() override
Creates the buffer allocator subsystem.
Definition: platform.cpp:100
Definition: android_input_receiver.h:36
EGLNativeDisplayType egl_native_display() const override
Definition: platform.cpp:141

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016