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/dri/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/dri/ozone_platform_gbm.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gbm.h> | 8 #include <gbm.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "ui/events/ozone/device/device_manager.h" | 12 #include "ui/events/ozone/device/device_manager.h" |
13 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 13 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
14 #include "ui/ozone/common/window/platform_window_compat.h" | |
15 #include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h" | 14 #include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h" |
| 15 #include "ui/ozone/platform/dri/dri_window.h" |
16 #include "ui/ozone/platform/dri/dri_wrapper.h" | 16 #include "ui/ozone/platform/dri/dri_wrapper.h" |
17 #include "ui/ozone/platform/dri/gbm_buffer.h" | 17 #include "ui/ozone/platform/dri/gbm_buffer.h" |
18 #include "ui/ozone/platform/dri/gbm_surface.h" | 18 #include "ui/ozone/platform/dri/gbm_surface.h" |
19 #include "ui/ozone/platform/dri/gbm_surface_factory.h" | 19 #include "ui/ozone/platform/dri/gbm_surface_factory.h" |
20 #include "ui/ozone/platform/dri/gpu_platform_support_gbm.h" | 20 #include "ui/ozone/platform/dri/gpu_platform_support_gbm.h" |
21 #include "ui/ozone/platform/dri/gpu_platform_support_host_gbm.h" | 21 #include "ui/ozone/platform/dri/gpu_platform_support_host_gbm.h" |
22 #include "ui/ozone/platform/dri/scanout_buffer.h" | 22 #include "ui/ozone/platform/dri/scanout_buffer.h" |
23 #include "ui/ozone/platform/dri/screen_manager.h" | 23 #include "ui/ozone/platform/dri/screen_manager.h" |
24 #include "ui/ozone/platform/dri/virtual_terminal_manager.h" | 24 #include "ui/ozone/platform/dri/virtual_terminal_manager.h" |
25 #include "ui/ozone/public/cursor_factory_ozone.h" | 25 #include "ui/ozone/public/cursor_factory_ozone.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE { | 91 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE { |
92 return gpu_platform_support_.get(); | 92 return gpu_platform_support_.get(); |
93 } | 93 } |
94 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE { | 94 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE { |
95 return gpu_platform_support_host_.get(); | 95 return gpu_platform_support_host_.get(); |
96 } | 96 } |
97 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( | 97 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
98 PlatformWindowDelegate* delegate, | 98 PlatformWindowDelegate* delegate, |
99 const gfx::Rect& bounds) OVERRIDE { | 99 const gfx::Rect& bounds) OVERRIDE { |
100 return make_scoped_ptr<PlatformWindow>( | 100 return scoped_ptr<PlatformWindow>(new DriWindow(delegate, bounds)); |
101 new PlatformWindowCompat(delegate, bounds)); | |
102 } | 101 } |
103 #if defined(OS_CHROMEOS) | 102 #if defined(OS_CHROMEOS) |
104 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() | 103 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() |
105 OVERRIDE { | 104 OVERRIDE { |
106 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( | 105 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy( |
107 gpu_platform_support_host_.get(), device_manager_.get())); | 106 gpu_platform_support_host_.get(), device_manager_.get())); |
108 } | 107 } |
109 virtual scoped_ptr<TouchscreenDeviceManager> | 108 virtual scoped_ptr<TouchscreenDeviceManager> |
110 CreateTouchscreenDeviceManager() OVERRIDE { | 109 CreateTouchscreenDeviceManager() OVERRIDE { |
111 return scoped_ptr<TouchscreenDeviceManager>( | 110 return scoped_ptr<TouchscreenDeviceManager>( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } // namespace | 170 } // namespace |
172 | 171 |
173 OzonePlatform* CreateOzonePlatformGbm() { | 172 OzonePlatform* CreateOzonePlatformGbm() { |
174 return new OzonePlatformGbm(false); | 173 return new OzonePlatformGbm(false); |
175 } | 174 } |
176 OzonePlatform* CreateOzonePlatformGbmEglImage() { | 175 OzonePlatform* CreateOzonePlatformGbmEglImage() { |
177 return new OzonePlatformGbm(true); | 176 return new OzonePlatformGbm(true); |
178 } | 177 } |
179 | 178 |
180 } // namespace ui | 179 } // namespace ui |
OLD | NEW |