Mir
platform.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 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: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
17  */
18 
19 #ifndef MIR_PLATFORMS_EGLSTREAM_KMS_PLATFORM_H_
20 #define MIR_PLATFORMS_EGLSTREAM_KMS_PLATFORM_H_
21 
22 #include "mir/graphics/platform.h"
23 #include "mir/options/option.h"
25 #include "mir/graphics/display.h"
27 #include "mir/fd.h"
28 
29 #include <EGL/egl.h>
30 #include <EGL/eglext.h>
31 
32 namespace mir
33 {
34 namespace graphics
35 {
36 namespace eglstream
37 {
39 {
40 public:
41  Platform(
42  EGLDeviceEXT device,
43  std::shared_ptr<EmergencyCleanupRegistry> const& /*emergency_cleanup_registry*/,
44  std::shared_ptr<DisplayReport> const& /*report*/);
45  ~Platform() = default;
46 
48 
50  std::shared_ptr<DisplayConfigurationPolicy> const& /*initial_conf_policy*/,
51  std::shared_ptr<GLConfig> const& /*gl_config*/) override;
52 
54 
55 private:
56  EGLDeviceEXT device;
57  EGLDisplay display;
58  mir::Fd const drm_node;
59 };
60 }
61 }
62 }
63 
64 #endif // MIR_PLATFORMS_EGLSTREAM_KMS_PLATFORM_H_
All things Mir.
Definition: atomic_callback.h:25
Definition: fd.h:33
Interface to platform specific support for graphics operations.
Definition: platform.h:65
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
UniqueModulePtr< GraphicBufferAllocator > create_buffer_allocator() override
Creates the buffer allocator subsystem.
Definition: platform.cpp:101
UniqueModulePtr< Display > create_display(std::shared_ptr< DisplayConfigurationPolicy > const &, std::shared_ptr< GLConfig > const &) override
Creates the display subsystem.
Definition: platform.cpp:106
Definition: platform.h:38
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:113

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