Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 EventFilter; }
29 namespace graphics
30 {
31 namespace nested
32 {
33 
34 class NestedPlatform : public Platform
35 {
36 public:
38  std::shared_ptr<HostConnection> const& connection,
39  std::shared_ptr<input::EventFilter> const& event_handler,
40  std::shared_ptr<DisplayReport> const& display_report,
41  std::shared_ptr<NativePlatform> const& native_platform);
42 
43  ~NestedPlatform() noexcept;
44  std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator(
45  std::shared_ptr<BufferInitializer> const& buffer_initializer) override;
46  std::shared_ptr<Display> create_display(
47  std::shared_ptr<DisplayConfigurationPolicy> const& initial_conf_policy,
48  std::shared_ptr<GLConfig> const& gl_config);
49  std::shared_ptr<PlatformIPCPackage> get_ipc_package() override;
50  std::shared_ptr<InternalClient> create_internal_client() override;
51  void fill_ipc_package(BufferIPCPacker* packer, Buffer const* Buffer) const override;
52  EGLNativeDisplayType egl_native_display() const;
53 
54 private:
55  std::shared_ptr<NativePlatform> const native_platform;
56  std::shared_ptr<input::EventFilter> const event_handler;
57  std::shared_ptr<DisplayReport> const display_report;
58  std::shared_ptr<HostConnection> const connection;
59 };
60 
61 }
62 }
63 }
64 
65 #endif // MIR_GRAPHICS_NESTED_NESTED_PLATFORM_H
NestedPlatform(std::shared_ptr< HostConnection > const &connection, std::shared_ptr< input::EventFilter > const &event_handler, std::shared_ptr< DisplayReport > const &display_report, std::shared_ptr< NativePlatform > const &native_platform)
Definition: nested_platform.cpp:88
Interface to platform specific support for graphics operations.
Definition: platform.h:64
EGLNativeDisplayType egl_native_display() const
Definition: nested_platform.cpp:139
std::shared_ptr< GraphicBufferAllocator > create_buffer_allocator(std::shared_ptr< BufferInitializer > const &buffer_initializer) override
Creates the buffer allocator subsystem.
Definition: nested_platform.cpp:110
std::shared_ptr< InternalClient > create_internal_client() override
Creates the in-process client support object.
Definition: nested_platform.cpp:129
~NestedPlatform() noexcept
Definition: nested_platform.cpp:106
std::shared_ptr< PlatformIPCPackage > get_ipc_package() override
Gets the IPC package for the platform.
Definition: nested_platform.cpp:124
std::shared_ptr< Display > create_display(std::shared_ptr< DisplayConfigurationPolicy > const &initial_conf_policy, std::shared_ptr< GLConfig > const &gl_config)
Creates the display subsystem.
Definition: nested_platform.cpp:116
void fill_ipc_package(BufferIPCPacker *packer, Buffer const *Buffer) const override
Fills the IPC package for a buffer.
Definition: nested_platform.cpp:134
Definition: buffer_ipc_packer.h:30
Definition: buffer.h:34
Definition: nested_platform.h:34

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014