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_MESA_PLATFORM_H_
20 #define MIR_GRAPHICS_MESA_PLATFORM_H_
21 
22 #include "mir/graphics/platform.h"
23 #include "platform_common.h"
24 #include "display_helpers.h"
25 
26 namespace mir
27 {
28 class EmergencyCleanupRegistry;
29 namespace graphics
30 {
31 namespace mesa
32 {
33 
34 class VirtualTerminal;
35 class InternalNativeDisplay;
37  public std::enable_shared_from_this<Platform>
38 {
39 public:
40  explicit Platform(std::shared_ptr<DisplayReport> const& reporter,
41  std::shared_ptr<VirtualTerminal> const& vt,
42  EmergencyCleanupRegistry& emergency_cleanup_registry,
44 
45  /* From Platform */
46  std::shared_ptr<graphics::GraphicBufferAllocator> create_buffer_allocator() override;
47  std::shared_ptr<graphics::Display> create_display(
48  std::shared_ptr<DisplayConfigurationPolicy> const& initial_conf_policy,
49  std::shared_ptr<GLConfig> const& gl_config) override;
50 
51  std::shared_ptr<PlatformIpcOperations> make_ipc_operations() const override;
52 
53  EGLNativeDisplayType egl_native_display() const override;
54 
55  std::shared_ptr<mir::udev::Context> udev;
56  std::shared_ptr<helpers::DRMHelper> const drm;
58 
59  std::shared_ptr<DisplayReport> const listener;
60  std::shared_ptr<VirtualTerminal> const vt;
61 
63 private:
64  BypassOption const bypass_option_;
65 };
66 
67 }
68 }
69 }
70 #endif /* MIR_GRAPHICS_MESA_PLATFORM_H_ */
BypassOption bypass_option() const
All things Mir.
Definition: atomic_callback.h:25
std::shared_ptr< mir::udev::Context > udev
Definition: platform.h:55
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...
Interface to platform specific support for graphics operations.
Definition: platform.h:66
std::shared_ptr< VirtualTerminal > const vt
Definition: platform.h:60
std::shared_ptr< DisplayReport > const listener
Definition: platform.h:59
Definition: display_helpers.h:86
EGLNativeDisplayType egl_native_display() const override
std::shared_ptr< graphics::GraphicBufferAllocator > create_buffer_allocator() override
Creates the buffer allocator subsystem.
std::shared_ptr< graphics::Display > create_display(std::shared_ptr< DisplayConfigurationPolicy > const &initial_conf_policy, std::shared_ptr< GLConfig > const &gl_config) override
Creates the display subsystem.
Definition: emergency_cleanup_registry.h:30
std::shared_ptr< helpers::DRMHelper > const drm
Definition: platform.h:56
Definition: platform.h:36
helpers::GBMHelper gbm
Definition: platform.h:57
BypassOption
Definition: platform_common.h:29

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015