Mir
platform.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 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: Cemil Azizoglu <cemil.azizoglu@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_X_PLATFORM_H_
20 #define MIR_GRAPHICS_X_PLATFORM_H_
21 
22 #include "mir/graphics/platform.h"
23 #include "display_helpers.h"
24 #include "mir/geometry/size.h"
25 
26 #include <X11/Xlib.h>
27 #include <X11/Xutil.h>
28 
29 namespace mir
30 {
31 namespace graphics
32 {
33 namespace X
34 {
35 
37 {
38 public:
39  explicit Platform(std::shared_ptr<::Display> const& conn, mir::geometry::Size const size);
40  ~Platform() = default;
41 
42  /* From Platform */
44 
46  std::shared_ptr<DisplayConfigurationPolicy> const& initial_conf_policy,
47  std::shared_ptr<GLConfig> const& gl_config) override;
48 
50 
51 private:
52  std::shared_ptr<::Display> const x11_connection;
53  std::shared_ptr<mir::udev::Context> udev;
54  std::shared_ptr<mesa::helpers::DRMHelper> const drm;
56  mir::geometry::Size const size;
57 };
58 
59 }
60 }
61 }
62 #endif /* MIR_GRAPHICS_X_PLATFORM_H_ */
Definition: size.h:30
All things Mir.
Definition: atomic_callback.h:25
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< 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.h:36
Definition: display_helpers.h:85
UniqueModulePtr< graphics::GraphicBufferAllocator > create_buffer_allocator() override
Creates the buffer allocator subsystem.
detail::IntWrapper< struct XTag > X
Definition: dimensions.h:111
UniqueModulePtr< graphics::Display > create_display(std::shared_ptr< DisplayConfigurationPolicy > const &initial_conf_policy, std::shared_ptr< GLConfig > const &gl_config) override
Creates the display subsystem.

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