Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1108)

Side by Side Diff: ui/ozone/platform/egltest/ozone_platform_egltest.cc

Issue 339793007: Revert of ozone: gpu: Add plumbing for platform-specific gpu messaging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
20 #include "ui/ozone/ozone_platform.h" 18 #include "ui/ozone/ozone_platform.h"
21 #include "ui/ozone/ozone_switches.h" 19 #include "ui/ozone/ozone_switches.h"
22 20
23 #if defined(OS_CHROMEOS) 21 #if defined(OS_CHROMEOS)
24 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" 22 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
25 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h" 23 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h"
26 #endif 24 #endif
27 25
28 #include <EGL/egl.h> 26 #include <EGL/egl.h>
29 27
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // OzonePlatform: 238 // OzonePlatform:
241 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE { 239 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
242 return surface_factory_ozone_.get(); 240 return surface_factory_ozone_.get();
243 } 241 }
244 virtual EventFactoryOzone* GetEventFactoryOzone() OVERRIDE { 242 virtual EventFactoryOzone* GetEventFactoryOzone() OVERRIDE {
245 return event_factory_ozone_.get(); 243 return event_factory_ozone_.get();
246 } 244 }
247 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE { 245 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
248 return cursor_factory_ozone_.get(); 246 return cursor_factory_ozone_.get();
249 } 247 }
250 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
251 return gpu_platform_support_.get();
252 }
253 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
254 return gpu_platform_support_host_.get();
255 }
256 248
257 #if defined(OS_CHROMEOS) 249 #if defined(OS_CHROMEOS)
258 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 250 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
259 OVERRIDE { 251 OVERRIDE {
260 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); 252 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
261 } 253 }
262 virtual scoped_ptr<TouchscreenDeviceManager> 254 virtual scoped_ptr<TouchscreenDeviceManager>
263 CreateTouchscreenDeviceManager() OVERRIDE { 255 CreateTouchscreenDeviceManager() OVERRIDE {
264 return scoped_ptr<TouchscreenDeviceManager>( 256 return scoped_ptr<TouchscreenDeviceManager>(
265 new TouchscreenDeviceManagerOzone()); 257 new TouchscreenDeviceManagerOzone());
266 } 258 }
267 #endif 259 #endif
268 260
269 virtual void InitializeUI() OVERRIDE { 261 virtual void InitializeUI() OVERRIDE {
270 device_manager_ = CreateDeviceManager(); 262 device_manager_ = CreateDeviceManager();
271 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); 263 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_));
272 event_factory_ozone_.reset( 264 event_factory_ozone_.reset(
273 new EventFactoryEvdev(NULL, device_manager_.get())); 265 new EventFactoryEvdev(NULL, device_manager_.get()));
274 cursor_factory_ozone_.reset(new CursorFactoryOzone()); 266 cursor_factory_ozone_.reset(new CursorFactoryOzone());
275 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
276 } 267 }
277 268
278 virtual void InitializeGPU() OVERRIDE { 269 virtual void InitializeGPU() OVERRIDE {
279 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_)); 270 surface_factory_ozone_.reset(new SurfaceFactoryEgltest(&eglplatform_shim_));
280 gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
281 } 271 }
282 272
283 private: 273 private:
284 LibeglplatformShimLoader eglplatform_shim_; 274 LibeglplatformShimLoader eglplatform_shim_;
285 scoped_ptr<DeviceManager> device_manager_; 275 scoped_ptr<DeviceManager> device_manager_;
286 scoped_ptr<SurfaceFactoryEgltest> surface_factory_ozone_; 276 scoped_ptr<SurfaceFactoryEgltest> surface_factory_ozone_;
287 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; 277 scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
288 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; 278 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
289 scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
290 scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
291 279
292 bool shim_initialized_; 280 bool shim_initialized_;
293 281
294 DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest); 282 DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest);
295 }; 283 };
296 284
297 } // namespace 285 } // namespace
298 286
299 OzonePlatform* CreateOzonePlatformEgltest() { 287 OzonePlatform* CreateOzonePlatformEgltest() {
300 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 288 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
301 platform->Initialize(); 289 platform->Initialize();
302 return platform; 290 return platform;
303 } 291 }
304 292
305 } // namespace ui 293 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_gbm.cc ('k') | ui/ozone/platform/test/ozone_platform_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698