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 class NativeWindowReport;
38 
40 {
41 public:
42  Platform(
43  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
44  std::shared_ptr<DisplayComponentFactory> const& display_buffer_builder,
45  std::shared_ptr<DisplayReport> const& display_report,
46  std::shared_ptr<NativeWindowReport> const& native_window_report,
47  OverlayOptimization overlay_option,
48  std::shared_ptr<DeviceQuirks> const& quirks);
49 
50  /* From Platform */
53  std::shared_ptr<graphics::DisplayConfigurationPolicy> const&,
54  std::shared_ptr<graphics::GLConfig> const& /*gl_config*/) override;
56 
57 private:
58  std::shared_ptr<graphics::GraphicBufferAllocator> const buffer_allocator;
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  std::shared_ptr<DeviceQuirks> const quirks;
63  std::shared_ptr<NativeWindowReport> const native_window_report;
64  OverlayOptimization const overlay_option;
65 
66 };
67 
68 }
69 }
70 }
71 #endif /* MIR_GRAPHICS_ANDROID_PLATFORM_H_ */
All things Mir.
Definition: atomic_callback.h:25
Definition: platform.h:39
Interface to platform specific support for graphics operations.
Definition: platform.h:65
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:149
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:113
Definition: android_input_receiver.h:36

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016