Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
android_platform.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_ANDROID_PLATFORM_H_
20 #define MIR_GRAPHICS_ANDROID_ANDROID_PLATFORM_H_
21 
22 #include "mir/graphics/platform.h"
24 
25 namespace mir
26 {
27 namespace graphics
28 {
29 class DisplayReport;
30 namespace android
31 {
32 class GraphicBufferAllocator;
33 class FramebufferFactory;
34 
35 class AndroidPlatform : public Platform, public NativePlatform
36 {
37 public:
38  /* From Platform */
39  AndroidPlatform(std::shared_ptr<DisplayReport> const& display_report);
40 
41  std::shared_ptr<graphics::GraphicBufferAllocator> create_buffer_allocator(
42  std::shared_ptr<BufferInitializer> const& buffer_initializer);
43  std::shared_ptr<Display> create_display(
44  std::shared_ptr<graphics::DisplayConfigurationPolicy> const&);
45  std::shared_ptr<PlatformIPCPackage> get_ipc_package();
46  std::shared_ptr<InternalClient> create_internal_client();
47  void fill_ipc_package(std::shared_ptr<BufferIPCPacker> const& packer,
48  std::shared_ptr<graphics::Buffer> const& buffer) const;
49 
50 private:
51  void initialize(std::shared_ptr<NestedContext> const& nested_context) override;
52 
53  // TODO a design that has this and create_buffer_allocator is missing simplicity
54  virtual std::shared_ptr<GraphicBufferAllocator> create_mga_buffer_allocator(
55  const std::shared_ptr<BufferInitializer>& buffer_initializer);
56 
57  std::shared_ptr<DisplayReport> const display_report;
58 };
59 
60 }
61 }
62 }
63 #endif /* MIR_GRAPHICS_ANDROID_ANDROID_PLATFORM_H_ */

Copyright © 2012,2013 Canonical Ltd.
Generated on Wed Oct 30 18:52:19 UTC 2013