| 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/egltest/ozone_platform_egltest.h" | 5 #include "ui/ozone/platform/egltest/ozone_platform_egltest.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "library_loaders/libeglplatform_shim.h" | 11 #include "library_loaders/libeglplatform_shim.h" |
| 12 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" | 12 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" |
| 13 #include "ui/events/ozone/device/device_manager.h" | 13 #include "ui/events/ozone/device/device_manager.h" |
| 14 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 14 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 15 #include "ui/gfx/ozone/impl/file_surface_factory.h" | 15 #include "ui/gfx/ozone/impl/file_surface_factory.h" |
| 16 #include "ui/gfx/ozone/surface_ozone_egl.h" | 16 #include "ui/gfx/ozone/surface_ozone_egl.h" |
| 17 #include "ui/gfx/vsync_provider.h" | 17 #include "ui/gfx/vsync_provider.h" |
| 18 #include "ui/ozone/gpu/gpu_platform_support.h" |
| 19 #include "ui/ozone/gpu/gpu_platform_support_host.h" |
| 18 #include "ui/ozone/ozone_platform.h" | 20 #include "ui/ozone/ozone_platform.h" |
| 19 #include "ui/ozone/ozone_switches.h" | 21 #include "ui/ozone/ozone_switches.h" |
| 20 | 22 |
| 21 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
| 22 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" | 24 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" |
| 23 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" | 25 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" |
| 24 #endif | 26 #endif |
| 25 | 27 |
| 26 #include <EGL/egl.h> | 28 #include <EGL/egl.h> |
| 27 | 29 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 new TouchscreenDeviceManagerOzone()); | 259 new TouchscreenDeviceManagerOzone()); |
| 258 } | 260 } |
| 259 #endif | 261 #endif |
| 260 | 262 |
| 261 virtual void InitializeUI() OVERRIDE { | 263 virtual void InitializeUI() OVERRIDE { |
| 262 device_manager_ = CreateDeviceManager(); | 264 device_manager_ = CreateDeviceManager(); |
| 263 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); | 265 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); |
| 264 event_factory_ozone_.reset( | 266 event_factory_ozone_.reset( |
| 265 new EventFactoryEvdev(NULL, device_manager_.get())); | 267 new EventFactoryEvdev(NULL, device_manager_.get())); |
| 266 cursor_factory_ozone_.reset(new CursorFactoryOzone()); | 268 cursor_factory_ozone_.reset(new CursorFactoryOzone()); |
| 269 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
| 267 } | 270 } |
| 268 | 271 |
| 269 virtual void InitializeGPU() OVERRIDE { | 272 virtual void InitializeGPU() OVERRIDE { |
| 270 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); | 273 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); |
| 274 gpu_platform_support_.reset(CreateStubGpuPlatformSupport()); |
| 271 } | 275 } |
| 272 | 276 |
| 273 private: | 277 private: |
| 274 LibeglplatformShimLoader eglplatform_shim_; | 278 LibeglplatformShimLoader eglplatform_shim_; |
| 275 scoped_ptr<DeviceManager> device_manager_; | 279 scoped_ptr<DeviceManager> device_manager_; |
| 276 scoped_ptr<SurfaceFactoryEgltest> surface_factory_ozone_; | 280 scoped_ptr<SurfaceFactoryEgltest> surface_factory_ozone_; |
| 277 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; | 281 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; |
| 278 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; | 282 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; |
| 283 scoped_ptr<GpuPlatformSupport> gpu_platform_support_; |
| 284 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_; |
| 279 | 285 |
| 280 bool shim_initialized_; | 286 bool shim_initialized_; |
| 281 | 287 |
| 282 DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest); | 288 DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest); |
| 283 }; | 289 }; |
| 284 | 290 |
| 285 } // namespace | 291 } // namespace |
| 286 | 292 |
| 287 OzonePlatform* CreateOzonePlatformEgltest() { | 293 OzonePlatform* CreateOzonePlatformEgltest() { |
| 288 OzonePlatformEgltest* platform = new OzonePlatformEgltest; | 294 OzonePlatformEgltest* platform = new OzonePlatformEgltest; |
| 289 platform->Initialize(); | 295 platform->Initialize(); |
| 290 return platform; | 296 return platform; |
| 291 } | 297 } |
| 292 | 298 |
| 293 } // namespace ui | 299 } // namespace ui |
| OLD | NEW |