OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <gbm.h> | 9 #include <gbm.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { | 96 GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { |
97 return gpu_platform_support_host_.get(); | 97 return gpu_platform_support_host_.get(); |
98 } | 98 } |
99 scoped_ptr<SystemInputInjector> CreateSystemInputInjector() override { | 99 scoped_ptr<SystemInputInjector> CreateSystemInputInjector() override { |
100 return event_factory_ozone_->CreateSystemInputInjector(); | 100 return event_factory_ozone_->CreateSystemInputInjector(); |
101 } | 101 } |
102 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 102 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
103 PlatformWindowDelegate* delegate, | 103 PlatformWindowDelegate* delegate, |
104 const gfx::Rect& bounds) override { | 104 const gfx::Rect& bounds) override { |
105 scoped_ptr<DrmWindowHost> platform_window( | 105 scoped_ptr<DrmWindowHost> platform_window(new DrmWindowHost( |
106 new DrmWindowHost(delegate, bounds, gpu_platform_support_host_.get(), | 106 delegate, bounds, gpu_platform_support_host_.get(), |
107 event_factory_ozone_.get(), cursor_.get(), | 107 event_factory_ozone_.get(), cursor_.get(), window_manager_.get(), |
108 window_manager_.get(), display_manager_.get())); | 108 display_manager_.get(), overlay_manager_.get())); |
109 platform_window->Initialize(); | 109 platform_window->Initialize(); |
110 return std::move(platform_window); | 110 return std::move(platform_window); |
111 } | 111 } |
112 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 112 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
113 return make_scoped_ptr( | 113 return make_scoped_ptr( |
114 new DrmNativeDisplayDelegate(display_manager_.get())); | 114 new DrmNativeDisplayDelegate(display_manager_.get())); |
115 } | 115 } |
116 base::ScopedFD OpenClientNativePixmapDevice() const override { | 116 base::ScopedFD OpenClientNativePixmapDevice() const override { |
117 #if defined(USE_VGEM_MAP) | 117 #if defined(USE_VGEM_MAP) |
118 int vgem_fd = drmOpenWithType("vgem", nullptr, DRM_NODE_RENDER); | 118 int vgem_fd = drmOpenWithType("vgem", nullptr, DRM_NODE_RENDER); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 183 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
184 }; | 184 }; |
185 | 185 |
186 } // namespace | 186 } // namespace |
187 | 187 |
188 OzonePlatform* CreateOzonePlatformGbm() { | 188 OzonePlatform* CreateOzonePlatformGbm() { |
189 return new OzonePlatformGbm; | 189 return new OzonePlatformGbm; |
190 } | 190 } |
191 | 191 |
192 } // namespace ui | 192 } // namespace ui |
OLD | NEW |