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

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