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

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

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NativePixmapManager is singleton Created 5 years, 5 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
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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_descriptor_posix.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/path_service.h" 12 #include "base/path_service.h"
12 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
13 #include "library_loaders/libeglplatform_shim.h" 14 #include "library_loaders/libeglplatform_shim.h"
14 #include "third_party/khronos/EGL/egl.h" 15 #include "third_party/khronos/EGL/egl.h"
15 #include "ui/events/devices/device_data_manager.h" 16 #include "ui/events/devices/device_data_manager.h"
16 #include "ui/events/event.h" 17 #include "ui/events/event.h"
17 #include "ui/events/ozone/device/device_manager.h" 18 #include "ui/events/ozone/device/device_manager.h"
18 #include "ui/events/ozone/evdev/event_factory_evdev.h" 19 #include "ui/events/ozone/evdev/event_factory_evdev.h"
19 #include "ui/events/ozone/events_ozone.h" 20 #include "ui/events/ozone/events_ozone.h"
20 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 21 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
21 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" 22 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
22 #include "ui/events/platform/platform_event_dispatcher.h" 23 #include "ui/events/platform/platform_event_dispatcher.h"
23 #include "ui/gfx/vsync_provider.h" 24 #include "ui/gfx/vsync_provider.h"
24 #include "ui/ozone/common/egl_util.h" 25 #include "ui/ozone/common/egl_util.h"
25 #include "ui/ozone/common/native_display_delegate_ozone.h" 26 #include "ui/ozone/common/native_display_delegate_ozone.h"
26 #include "ui/ozone/common/stub_overlay_manager.h" 27 #include "ui/ozone/common/stub_overlay_manager.h"
27 #include "ui/ozone/public/cursor_factory_ozone.h" 28 #include "ui/ozone/public/cursor_factory_ozone.h"
28 #include "ui/ozone/public/gpu_platform_support.h" 29 #include "ui/ozone/public/gpu_platform_support.h"
29 #include "ui/ozone/public/gpu_platform_support_host.h" 30 #include "ui/ozone/public/gpu_platform_support_host.h"
31 #include "ui/ozone/public/native_pixmap_manager.h"
30 #include "ui/ozone/public/ozone_platform.h" 32 #include "ui/ozone/public/ozone_platform.h"
31 #include "ui/ozone/public/ozone_switches.h" 33 #include "ui/ozone/public/ozone_switches.h"
32 #include "ui/ozone/public/surface_factory_ozone.h" 34 #include "ui/ozone/public/surface_factory_ozone.h"
33 #include "ui/ozone/public/surface_ozone_egl.h" 35 #include "ui/ozone/public/surface_ozone_egl.h"
34 #include "ui/ozone/public/system_input_injector.h" 36 #include "ui/ozone/public/system_input_injector.h"
35 #include "ui/platform_window/platform_window.h" 37 #include "ui/platform_window/platform_window.h"
36 #include "ui/platform_window/platform_window_delegate.h" 38 #include "ui/platform_window/platform_window_delegate.h"
37 39
38 namespace ui { 40 namespace ui {
39 41
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 363 }
362 scoped_ptr<PlatformWindow> CreatePlatformWindow( 364 scoped_ptr<PlatformWindow> CreatePlatformWindow(
363 PlatformWindowDelegate* delegate, 365 PlatformWindowDelegate* delegate,
364 const gfx::Rect& bounds) override { 366 const gfx::Rect& bounds) override {
365 return make_scoped_ptr<PlatformWindow>(new EgltestWindow( 367 return make_scoped_ptr<PlatformWindow>(new EgltestWindow(
366 delegate, &eglplatform_shim_, event_factory_ozone_.get(), bounds)); 368 delegate, &eglplatform_shim_, event_factory_ozone_.get(), bounds));
367 } 369 }
368 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 370 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
369 return make_scoped_ptr(new NativeDisplayDelegateOzone()); 371 return make_scoped_ptr(new NativeDisplayDelegateOzone());
370 } 372 }
373 base::FileDescriptor GetVirtualDeviceFd() override {
374 return base::FileDescriptor();
375 }
371 376
372 void InitializeUI() override { 377 void InitializeUI() override {
373 device_manager_ = CreateDeviceManager(); 378 device_manager_ = CreateDeviceManager();
374 overlay_manager_.reset(new StubOverlayManager()); 379 overlay_manager_.reset(new StubOverlayManager());
375 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 380 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
376 make_scoped_ptr(new StubKeyboardLayoutEngine())); 381 make_scoped_ptr(new StubKeyboardLayoutEngine()));
377 event_factory_ozone_.reset(new EventFactoryEvdev( 382 event_factory_ozone_.reset(new EventFactoryEvdev(
378 NULL, device_manager_.get(), 383 NULL, device_manager_.get(),
379 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 384 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
380 cursor_factory_ozone_.reset(new CursorFactoryOzone()); 385 cursor_factory_ozone_.reset(new CursorFactoryOzone());
(...skipping 21 matching lines...) Expand all
402 }; 407 };
403 408
404 } // namespace 409 } // namespace
405 410
406 OzonePlatform* CreateOzonePlatformEgltest() { 411 OzonePlatform* CreateOzonePlatformEgltest() {
407 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 412 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
408 platform->Initialize(); 413 platform->Initialize();
409 return platform; 414 return platform;
410 } 415 }
411 416
417 NativePixmapManager* CreateNativePixmapManagerEgltest() {
418 return CreateStubNativePixmapManager();
419 }
420
412 } // namespace ui 421 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698