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

Side by Side Diff: ui/ozone/platform/dri/ozone_platform_dri.cc

Issue 936703002: Fix UiThreadGpu initialization for video accelerator tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 5 years, 10 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
« no previous file with comments | « ui/ozone/ozone.gyp ('k') | ui/ozone/public/ozone_gpu_test_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_dri.h" 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/thread_task_runner_handle.h"
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
9 #include "ui/events/ozone/device/device_manager.h" 10 #include "ui/events/ozone/device/device_manager.h"
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 11 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
11 #include "ui/events/ozone/evdev/event_factory_evdev.h" 12 #include "ui/events/ozone/evdev/event_factory_evdev.h"
12 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 13 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
13 #include "ui/ozone/platform/dri/display_manager.h" 14 #include "ui/ozone/platform/dri/display_manager.h"
14 #include "ui/ozone/platform/dri/dri_buffer.h" 15 #include "ui/ozone/platform/dri/dri_buffer.h"
15 #include "ui/ozone/platform/dri/dri_cursor.h" 16 #include "ui/ozone/platform/dri/dri_cursor.h"
16 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h"
17 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" 18 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h"
18 #include "ui/ozone/platform/dri/dri_surface_factory.h" 19 #include "ui/ozone/platform/dri/dri_surface_factory.h"
19 #include "ui/ozone/platform/dri/dri_util.h" 20 #include "ui/ozone/platform/dri/dri_util.h"
20 #include "ui/ozone/platform/dri/dri_window.h" 21 #include "ui/ozone/platform/dri/dri_window.h"
21 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" 22 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h"
22 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" 23 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h"
23 #include "ui/ozone/platform/dri/dri_window_manager.h" 24 #include "ui/ozone/platform/dri/dri_window_manager.h"
24 #include "ui/ozone/platform/dri/dri_wrapper.h" 25 #include "ui/ozone/platform/dri/dri_wrapper.h"
25 #include "ui/ozone/platform/dri/drm_device_manager.h" 26 #include "ui/ozone/platform/dri/drm_device_manager.h"
26 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" 27 #include "ui/ozone/platform/dri/native_display_delegate_dri.h"
27 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h" 28 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h"
28 #include "ui/ozone/platform/dri/screen_manager.h" 29 #include "ui/ozone/platform/dri/screen_manager.h"
30 #include "ui/ozone/public/ozone_gpu_test_helper.h"
29 #include "ui/ozone/public/ozone_platform.h" 31 #include "ui/ozone/public/ozone_platform.h"
30 #include "ui/ozone/public/ui_thread_gpu.h"
31 32
32 #if defined(USE_XKBCOMMON) 33 #if defined(USE_XKBCOMMON)
33 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" 34 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h"
34 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" 35 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h"
35 #else 36 #else
36 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" 37 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
37 #endif 38 #endif
38 39
39 namespace ui { 40 namespace ui {
40 41
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( 113 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
113 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_))); 114 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_)));
114 #else 115 #else
115 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 116 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
116 make_scoped_ptr(new StubKeyboardLayoutEngine())); 117 make_scoped_ptr(new StubKeyboardLayoutEngine()));
117 #endif 118 #endif
118 event_factory_ozone_.reset(new EventFactoryEvdev( 119 event_factory_ozone_.reset(new EventFactoryEvdev(
119 cursor_.get(), device_manager_.get(), 120 cursor_.get(), device_manager_.get(),
120 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 121 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
121 122
122 if (!ui_thread_gpu_.Initialize()) 123 if (!gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
124 base::ThreadTaskRunnerHandle::Get()))
123 LOG(FATAL) << "Failed to initialize dummy channel."; 125 LOG(FATAL) << "Failed to initialize dummy channel.";
124 } 126 }
125 127
126 void InitializeGPU() override {} 128 void InitializeGPU() override {}
127 129
128 private: 130 private:
129 scoped_refptr<DriWrapper> dri_; 131 scoped_refptr<DriWrapper> dri_;
130 scoped_ptr<DrmDeviceManager> drm_device_manager_; 132 scoped_ptr<DrmDeviceManager> drm_device_manager_;
131 scoped_ptr<DriBufferGenerator> buffer_generator_; 133 scoped_ptr<DriBufferGenerator> buffer_generator_;
132 scoped_ptr<ScreenManager> screen_manager_; 134 scoped_ptr<ScreenManager> screen_manager_;
133 scoped_ptr<DeviceManager> device_manager_; 135 scoped_ptr<DeviceManager> device_manager_;
134 136
135 scoped_ptr<DriSurfaceFactory> surface_factory_ozone_; 137 scoped_ptr<DriSurfaceFactory> surface_factory_ozone_;
136 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; 138 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
137 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; 139 scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
138 140
139 scoped_ptr<DriCursor> cursor_; 141 scoped_ptr<DriCursor> cursor_;
140 scoped_ptr<DriWindowManager> window_manager_; 142 scoped_ptr<DriWindowManager> window_manager_;
141 scoped_ptr<DisplayManager> display_manager_; 143 scoped_ptr<DisplayManager> display_manager_;
142 144
143 scoped_ptr<DriGpuPlatformSupport> gpu_platform_support_; 145 scoped_ptr<DriGpuPlatformSupport> gpu_platform_support_;
144 scoped_ptr<DriGpuPlatformSupportHost> gpu_platform_support_host_; 146 scoped_ptr<DriGpuPlatformSupportHost> gpu_platform_support_host_;
145 147
146 DriWindowDelegateManager window_delegate_manager_; 148 DriWindowDelegateManager window_delegate_manager_;
147 149
148 UiThreadGpu ui_thread_gpu_; 150 OzoneGpuTestHelper gpu_helper_;
149 151
150 #if defined(USE_XKBCOMMON) 152 #if defined(USE_XKBCOMMON)
151 XkbEvdevCodes xkb_evdev_code_converter_; 153 XkbEvdevCodes xkb_evdev_code_converter_;
152 #endif 154 #endif
153 155
154 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); 156 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
155 }; 157 };
156 158
157 } // namespace 159 } // namespace
158 160
159 OzonePlatform* CreateOzonePlatformDri() { 161 OzonePlatform* CreateOzonePlatformDri() {
160 return new OzonePlatformDri; 162 return new OzonePlatformDri;
161 } 163 }
162 164
163 } // namespace ui 165 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/ozone.gyp ('k') | ui/ozone/public/ozone_gpu_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698