Commit 26a76588 authored by dnicoara's avatar dnicoara Committed by Commit bot

[Ozone-Drm] Fix Ozone initialization order

Need to initialize the WindowHostManager before the DrmCursor since the
DrmCursor depends on the WindowHostManager.

BUG=468485,467822

Review URL: https://codereview.chromium.org/1011533003

Cr-Commit-Position: refs/heads/master@{#322001}
parent 405c59e6
...@@ -103,6 +103,7 @@ class OzonePlatformDrm : public OzonePlatform { ...@@ -103,6 +103,7 @@ class OzonePlatformDrm : public OzonePlatform {
ForceInitializationOfPrimaryDisplay(drm_, screen_manager_.get()); ForceInitializationOfPrimaryDisplay(drm_, screen_manager_.get());
drm_device_manager_.reset(new DrmDeviceManager(drm_)); drm_device_manager_.reset(new DrmDeviceManager(drm_));
display_manager_.reset(new DisplayManager()); display_manager_.reset(new DisplayManager());
window_manager_.reset(new DrmWindowHostManager());
cursor_.reset(new DrmCursor(window_manager_.get())); cursor_.reset(new DrmCursor(window_manager_.get()));
surface_factory_ozone_.reset( surface_factory_ozone_.reset(
new DrmSurfaceFactory(&window_delegate_manager_)); new DrmSurfaceFactory(&window_delegate_manager_));
...@@ -114,7 +115,6 @@ class OzonePlatformDrm : public OzonePlatform { ...@@ -114,7 +115,6 @@ class OzonePlatformDrm : public OzonePlatform {
screen_manager_.get(), ndd.Pass())); screen_manager_.get(), ndd.Pass()));
gpu_platform_support_host_.reset( gpu_platform_support_host_.reset(
new DrmGpuPlatformSupportHost(cursor_.get())); new DrmGpuPlatformSupportHost(cursor_.get()));
window_manager_.reset(new DrmWindowHostManager());
cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
#if defined(USE_XKBCOMMON) #if defined(USE_XKBCOMMON)
KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
...@@ -147,9 +147,9 @@ class OzonePlatformDrm : public OzonePlatform { ...@@ -147,9 +147,9 @@ class OzonePlatformDrm : public OzonePlatform {
// Objects in the "Browser" process. // Objects in the "Browser" process.
scoped_ptr<DeviceManager> device_manager_; scoped_ptr<DeviceManager> device_manager_;
scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
scoped_ptr<DrmWindowHostManager> window_manager_;
scoped_ptr<DrmCursor> cursor_; scoped_ptr<DrmCursor> cursor_;
scoped_ptr<EventFactoryEvdev> event_factory_ozone_; scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
scoped_ptr<DrmWindowHostManager> window_manager_;
scoped_ptr<DisplayManager> display_manager_; scoped_ptr<DisplayManager> display_manager_;
scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_; scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_;
......
...@@ -154,10 +154,10 @@ class OzonePlatformGbm : public OzonePlatform { ...@@ -154,10 +154,10 @@ class OzonePlatformGbm : public OzonePlatform {
if (!surface_factory_ozone_) if (!surface_factory_ozone_)
surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_));
device_manager_ = CreateDeviceManager(); device_manager_ = CreateDeviceManager();
window_manager_.reset(new DrmWindowHostManager());
cursor_.reset(new DrmCursor(window_manager_.get())); cursor_.reset(new DrmCursor(window_manager_.get()));
gpu_platform_support_host_.reset( gpu_platform_support_host_.reset(
new DrmGpuPlatformSupportHost(cursor_.get())); new DrmGpuPlatformSupportHost(cursor_.get()));
window_manager_.reset(new DrmWindowHostManager());
cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
#if defined(USE_XKBCOMMON) #if defined(USE_XKBCOMMON)
KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
...@@ -221,10 +221,10 @@ class OzonePlatformGbm : public OzonePlatform { ...@@ -221,10 +221,10 @@ class OzonePlatformGbm : public OzonePlatform {
base::FilePath primary_graphics_card_path_; base::FilePath primary_graphics_card_path_;
scoped_ptr<DeviceManager> device_manager_; scoped_ptr<DeviceManager> device_manager_;
scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
scoped_ptr<DrmWindowHostManager> window_manager_;
scoped_ptr<DrmCursor> cursor_; scoped_ptr<DrmCursor> cursor_;
scoped_ptr<EventFactoryEvdev> event_factory_ozone_; scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_; scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_;
scoped_ptr<DrmWindowHostManager> window_manager_;
scoped_ptr<DisplayManager> display_manager_; scoped_ptr<DisplayManager> display_manager_;
#if defined(USE_XKBCOMMON) #if defined(USE_XKBCOMMON)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment