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

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_drm.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 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/drm/ozone_platform_drm.h" 5 #include "ui/ozone/platform/drm/ozone_platform_drm.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 "base/thread_task_runner_handle.h"
9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
10 #include "ui/events/ozone/device/device_manager.h" 10 #include "ui/events/ozone/device/device_manager.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 gpu_lock_.reset(new GpuLock()); 96 gpu_lock_.reset(new GpuLock());
97 #endif 97 #endif
98 if (!drm_->Initialize()) 98 if (!drm_->Initialize())
99 LOG(FATAL) << "Failed to initialize primary DRM device"; 99 LOG(FATAL) << "Failed to initialize primary DRM device";
100 100
101 // This makes sure that simple targets that do not handle display 101 // This makes sure that simple targets that do not handle display
102 // configuration can still use the primary display. 102 // configuration can still use the primary display.
103 ForceInitializationOfPrimaryDisplay(drm_, screen_manager_.get()); 103 ForceInitializationOfPrimaryDisplay(drm_, screen_manager_.get());
104 drm_device_manager_.reset(new DrmDeviceManager(drm_)); 104 drm_device_manager_.reset(new DrmDeviceManager(drm_));
105 display_manager_.reset(new DisplayManager()); 105 display_manager_.reset(new DisplayManager());
106 cursor_.reset(new DrmCursor(window_manager_.get()));
106 surface_factory_ozone_.reset( 107 surface_factory_ozone_.reset(
107 new DrmSurfaceFactory(&window_delegate_manager_)); 108 new DrmSurfaceFactory(&window_delegate_manager_));
108 scoped_ptr<DrmGpuDisplayManager> ndd(new DrmGpuDisplayManager( 109 scoped_ptr<DrmGpuDisplayManager> ndd(new DrmGpuDisplayManager(
109 screen_manager_.get(), drm_, 110 screen_manager_.get(), drm_,
110 scoped_ptr<DrmDeviceGenerator>(new DrmDeviceGenerator()))); 111 scoped_ptr<DrmDeviceGenerator>(new DrmDeviceGenerator())));
111 gpu_platform_support_.reset(new DrmGpuPlatformSupport( 112 gpu_platform_support_.reset(new DrmGpuPlatformSupport(
112 drm_device_manager_.get(), &window_delegate_manager_, 113 drm_device_manager_.get(), &window_delegate_manager_,
113 screen_manager_.get(), ndd.Pass())); 114 screen_manager_.get(), ndd.Pass()));
114 gpu_platform_support_host_.reset(new DrmGpuPlatformSupportHost()); 115 gpu_platform_support_host_.reset(
116 new DrmGpuPlatformSupportHost(cursor_.get()));
115 window_manager_.reset(new DrmWindowHostManager()); 117 window_manager_.reset(new DrmWindowHostManager());
116 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 118 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
117 cursor_.reset(
118 new DrmCursor(window_manager_.get(), gpu_platform_support_host_.get()));
119 cursor_->Init();
120 #if defined(USE_XKBCOMMON) 119 #if defined(USE_XKBCOMMON)
121 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr( 120 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
122 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_))); 121 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_)));
123 #else 122 #else
124 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 123 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
125 make_scoped_ptr(new StubKeyboardLayoutEngine())); 124 make_scoped_ptr(new StubKeyboardLayoutEngine()));
126 #endif 125 #endif
127 event_factory_ozone_.reset(new EventFactoryEvdev( 126 event_factory_ozone_.reset(new EventFactoryEvdev(
128 cursor_.get(), device_manager_.get(), 127 cursor_.get(), device_manager_.get(),
129 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 128 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
(...skipping 11 matching lines...) Expand all
141 scoped_refptr<DrmDevice> drm_; 140 scoped_refptr<DrmDevice> drm_;
142 scoped_ptr<DrmDeviceManager> drm_device_manager_; 141 scoped_ptr<DrmDeviceManager> drm_device_manager_;
143 scoped_ptr<DrmBufferGenerator> buffer_generator_; 142 scoped_ptr<DrmBufferGenerator> buffer_generator_;
144 scoped_ptr<ScreenManager> screen_manager_; 143 scoped_ptr<ScreenManager> screen_manager_;
145 scoped_ptr<DrmGpuPlatformSupport> gpu_platform_support_; 144 scoped_ptr<DrmGpuPlatformSupport> gpu_platform_support_;
146 DrmWindowManager window_delegate_manager_; 145 DrmWindowManager window_delegate_manager_;
147 146
148 // Objects in the "Browser" process. 147 // Objects in the "Browser" process.
149 scoped_ptr<DeviceManager> device_manager_; 148 scoped_ptr<DeviceManager> device_manager_;
150 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; 149 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
150 scoped_ptr<DrmCursor> cursor_;
151 scoped_ptr<EventFactoryEvdev> event_factory_ozone_; 151 scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
152 scoped_ptr<DrmCursor> cursor_;
153 scoped_ptr<DrmWindowHostManager> window_manager_; 152 scoped_ptr<DrmWindowHostManager> window_manager_;
154 scoped_ptr<DisplayManager> display_manager_; 153 scoped_ptr<DisplayManager> display_manager_;
155 scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_; 154 scoped_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_;
156 155
157 #if defined(USE_XKBCOMMON) 156 #if defined(USE_XKBCOMMON)
158 XkbEvdevCodes xkb_evdev_code_converter_; 157 XkbEvdevCodes xkb_evdev_code_converter_;
159 #endif 158 #endif
160 159
161 // Objects on both processes. 160 // Objects on both processes.
162 scoped_ptr<DrmSurfaceFactory> surface_factory_ozone_; 161 scoped_ptr<DrmSurfaceFactory> surface_factory_ozone_;
163 162
164 OzoneGpuTestHelper gpu_helper_; 163 OzoneGpuTestHelper gpu_helper_;
165 164
166 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDrm); 165 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDrm);
167 }; 166 };
168 167
169 } // namespace 168 } // namespace
170 169
171 OzonePlatform* CreateOzonePlatformDri() { 170 OzonePlatform* CreateOzonePlatformDri() {
172 return new OzonePlatformDrm; 171 return new OzonePlatformDrm;
173 } 172 }
174 173
175 OzonePlatform* CreateOzonePlatformDrm() { 174 OzonePlatform* CreateOzonePlatformDrm() {
176 return new OzonePlatformDrm; 175 return new OzonePlatformDrm;
177 } 176 }
178 177
179 } // namespace ui 178 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698