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

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 1024083002: [Ozone-Drm] Notify cursor of channel established last (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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/drm/ozone_platform_gbm.h" 5 #include "ui/ozone/platform/drm/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
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 display_manager_.get(), primary_graphics_card_path_)); 147 display_manager_.get(), primary_graphics_card_path_));
148 } 148 }
149 void InitializeUI() override { 149 void InitializeUI() override {
150 primary_graphics_card_path_ = GetPrimaryDisplayCardPath(); 150 primary_graphics_card_path_ = GetPrimaryDisplayCardPath();
151 display_manager_.reset(new DisplayManager()); 151 display_manager_.reset(new DisplayManager());
152 // Needed since the browser process creates the accelerated widgets and that 152 // Needed since the browser process creates the accelerated widgets and that
153 // happens through SFO. 153 // happens through SFO.
154 if (!surface_factory_ozone_) 154 if (!surface_factory_ozone_)
155 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); 155 surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
156 device_manager_ = CreateDeviceManager(); 156 device_manager_ = CreateDeviceManager();
157 gpu_platform_support_host_.reset(new DrmGpuPlatformSupportHost()); 157 cursor_.reset(new DrmCursor(window_manager_.get()));
158 gpu_platform_support_host_.reset(
159 new DrmGpuPlatformSupportHost(cursor_.get()));
158 window_manager_.reset(new DrmWindowHostManager()); 160 window_manager_.reset(new DrmWindowHostManager());
159 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 161 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
160 cursor_.reset(
161 new DrmCursor(window_manager_.get(), gpu_platform_support_host_.get()));
162 cursor_->Init();
163 #if defined(USE_XKBCOMMON) 162 #if defined(USE_XKBCOMMON)
164 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( 163 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
165 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_))); 164 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_)));
166 #else 165 #else
167 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 166 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
168 make_scoped_ptr(new StubKeyboardLayoutEngine())); 167 make_scoped_ptr(new StubKeyboardLayoutEngine()));
169 #endif 168 #endif
170 event_factory_ozone_.reset(new EventFactoryEvdev( 169 event_factory_ozone_.reset(new EventFactoryEvdev(
171 cursor_.get(), device_manager_.get(), 170 cursor_.get(), device_manager_.get(),
172 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 171 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Objects in the GPU process. 210 // Objects in the GPU process.
212 scoped_ptr<GpuLock> gpu_lock_; 211 scoped_ptr<GpuLock> gpu_lock_;
213 scoped_ptr<GlApiLoader> gl_api_loader_; 212 scoped_ptr<GlApiLoader> gl_api_loader_;
214 scoped_refptr<GbmDevice> gbm_; 213 scoped_refptr<GbmDevice> gbm_;
215 scoped_ptr<DrmDeviceManager> drm_device_manager_; 214 scoped_ptr<DrmDeviceManager> drm_device_manager_;
216 scoped_ptr<GbmBufferGenerator> buffer_generator_; 215 scoped_ptr<GbmBufferGenerator> buffer_generator_;
217 scoped_ptr<ScreenManager> screen_manager_; 216 scoped_ptr<ScreenManager> screen_manager_;
218 scoped_ptr<DrmGpuPlatformSupport> gpu_platform_support_; 217 scoped_ptr<DrmGpuPlatformSupport> gpu_platform_support_;
219 scoped_ptr<DrmWindowManager> window_delegate_manager_; 218 scoped_ptr<DrmWindowManager> window_delegate_manager_;
220 219
221 // Obejcts in the Browser process. 220 // Objects in the Browser process.
222 base::FilePath primary_graphics_card_path_; 221 base::FilePath primary_graphics_card_path_;
223 scoped_ptr<DeviceManager> device_manager_; 222 scoped_ptr<DeviceManager> device_manager_;
224 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; 223 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
224 scoped_ptr<DrmCursor> cursor_;
225 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; 225 scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
226 scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_; 226 scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_;
227 scoped_ptr<DrmCursor> cursor_;
228 scoped_ptr<DrmWindowHostManager> window_manager_; 227 scoped_ptr<DrmWindowHostManager> window_manager_;
229 scoped_ptr<DisplayManager> display_manager_; 228 scoped_ptr<DisplayManager> display_manager_;
230 229
231 #if defined(USE_XKBCOMMON) 230 #if defined(USE_XKBCOMMON)
232 XkbEvdevCodes xkb_evdev_code_converter_; 231 XkbEvdevCodes xkb_evdev_code_converter_;
233 #endif 232 #endif
234 233
235 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); 234 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm);
236 }; 235 };
237 236
238 } // namespace 237 } // namespace
239 238
240 OzonePlatform* CreateOzonePlatformGbm() { 239 OzonePlatform* CreateOzonePlatformGbm() {
241 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 240 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
242 #if defined(USE_MESA_PLATFORM_NULL) 241 #if defined(USE_MESA_PLATFORM_NULL)
243 // Only works with surfaceless. 242 // Only works with surfaceless.
244 cmd->AppendSwitch(switches::kOzoneUseSurfaceless); 243 cmd->AppendSwitch(switches::kOzoneUseSurfaceless);
245 #endif 244 #endif
246 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); 245 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
247 } 246 }
248 247
249 } // namespace ui 248 } // namespace ui
OLDNEW
« ui/ozone/platform/drm/host/drm_cursor.h ('K') | « ui/ozone/platform/drm/ozone_platform_drm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698