Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
nested_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 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 General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Eleni Maria Stea <elenimaria.stea@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_NESTED_NESTED_PLATFORM_H_
20 #define MIR_GRAPHICS_NESTED_NESTED_PLATFORM_H_
21 
22 #include "mir/graphics/platform.h"
24 #include "host_connection.h"
25 
26 namespace mir
27 {
28 namespace input { class InputDispatcher; }
29 namespace graphics
30 {
31 namespace nested
32 {
33 
34 class NestedPlatform : public Platform,
35  public std::enable_shared_from_this<NestedPlatform>
36 {
37 public:
39  std::shared_ptr<HostConnection> const& connection,
40  std::shared_ptr<input::InputDispatcher> const& dispatcher,
41  std::shared_ptr<DisplayReport> const& display_report,
42  std::shared_ptr<NativePlatform> const& native_platform);
43 
44  ~NestedPlatform() noexcept;
45  std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator(
46  std::shared_ptr<BufferInitializer> const& buffer_initializer) override;
47  std::shared_ptr<Display> create_display(
48  std::shared_ptr<DisplayConfigurationPolicy> const& initial_conf_policy,
49  std::shared_ptr<GLProgramFactory> const& gl_program_factory,
50  std::shared_ptr<GLConfig> const& gl_config);
51  std::shared_ptr<InternalClient> create_internal_client() override;
52  std::shared_ptr<PlatformIpcOperations> make_ipc_operations() const override;
53  std::shared_ptr<BufferWriter> make_buffer_writer() override;
54  EGLNativeDisplayType egl_native_display() const;
55 
56 private:
57  std::shared_ptr<NativePlatform> const native_platform;
58  std::shared_ptr<input::InputDispatcher> const dispatcher;
59  std::shared_ptr<DisplayReport> const display_report;
60  std::shared_ptr<HostConnection> const connection;
61 };
62 
63 }
64 }
65 }
66 
67 #endif // MIR_GRAPHICS_NESTED_NESTED_PLATFORM_H
All things Mir.
Definition: aging_buffer.h:24
std::shared_ptr< BufferWriter > make_buffer_writer() override
Definition: nested_platform.cpp:83
Interface to platform specific support for graphics operations.
Definition: platform.h:67
NestedPlatform(std::shared_ptr< HostConnection > const &connection, std::shared_ptr< input::InputDispatcher > const &dispatcher, std::shared_ptr< DisplayReport > const &display_report, std::shared_ptr< NativePlatform > const &native_platform)
Definition: nested_platform.cpp:60
EGLNativeDisplayType egl_native_display() const
Definition: nested_platform.cpp:131
std::shared_ptr< GraphicBufferAllocator > create_buffer_allocator(std::shared_ptr< BufferInitializer > const &buffer_initializer) override
Creates the buffer allocator subsystem.
Definition: nested_platform.cpp:77
std::shared_ptr< InternalClient > create_internal_client() override
Creates the in-process client support object.
Definition: nested_platform.cpp:97
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: nested_platform.cpp:126
~NestedPlatform() noexcept
Definition: nested_platform.cpp:73
std::shared_ptr< Display > create_display(std::shared_ptr< DisplayConfigurationPolicy > const &initial_conf_policy, std::shared_ptr< GLProgramFactory > const &gl_program_factory, std::shared_ptr< GLConfig > const &gl_config)
Creates the display subsystem.
Definition: nested_platform.cpp:88
Definition: nested_platform.h:34

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014