Mir
guest_platform.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 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:
17  * Eleni Maria Stea <elenimaria.stea@canonical.com>
18  * Alan Griffiths <alan@octopull.co.uk>
19  */
20 
21 #ifndef MIR_GRAPHICS_MESA_GUEST_PLATFORM_H_
22 #define MIR_GRAPHICS_MESA_GUEST_PLATFORM_H_
23 
24 #include "mir/graphics/platform.h"
26 #include "display_helpers.h"
27 
28 namespace mir
29 {
30 namespace graphics
31 {
32 namespace mesa
33 {
34 class InternalNativeDisplay;
35 
37 {
38 public:
39  GuestPlatform(std::shared_ptr<NestedContext> const& nested_context_arg);
40 
41  std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator() override;
42  std::shared_ptr<PlatformIpcOperations> make_ipc_operations() const override;
43 
44  std::shared_ptr<Display> create_display(
45  std::shared_ptr<graphics::DisplayConfigurationPolicy> const&,
46  std::shared_ptr<graphics::GLProgramFactory> const&,
47  std::shared_ptr<graphics::GLConfig> const& /*gl_config*/) override;
48  EGLNativeDisplayType egl_native_display() const override;
49 
50 private:
51  std::shared_ptr<NestedContext> nested_context;
53  std::shared_ptr<PlatformIpcOperations> ipc_ops;
54 };
55 }
56 }
57 }
58 
59 #endif // MIR_GRAPHICS_MESA_GUEST_PLATFORM_H_
GuestPlatform(std::shared_ptr< NestedContext > const &nested_context_arg)
Definition: guest_platform.cpp:41
All things Mir.
Definition: buffer_stream.h:37
Definition: guest_platform.h:36
Interface to platform specific support for graphics operations.
Definition: platform.h:66
Definition: display_helpers.h:79
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: guest_platform.cpp:70
std::shared_ptr< Display > create_display(std::shared_ptr< graphics::DisplayConfigurationPolicy > const &, std::shared_ptr< graphics::GLProgramFactory > const &, std::shared_ptr< graphics::GLConfig > const &) override
Definition: guest_platform.cpp:75
EGLNativeDisplayType egl_native_display() const override
Definition: guest_platform.cpp:83
std::shared_ptr< GraphicBufferAllocator > create_buffer_allocator() override
Creates the buffer allocator subsystem.
Definition: guest_platform.cpp:52

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