Chromium Code Reviews| Index: ui/ozone/platform/drm/ozone_platform_gbm.cc |
| diff --git a/ui/ozone/platform/drm/ozone_platform_gbm.cc b/ui/ozone/platform/drm/ozone_platform_gbm.cc |
| index 829a876831519f590ef6b04211d675c810689101..1902ab2e4934880280f9f605df096188b7ddbc79 100644 |
| --- a/ui/ozone/platform/drm/ozone_platform_gbm.cc |
| +++ b/ui/ozone/platform/drm/ozone_platform_gbm.cc |
| @@ -110,11 +110,13 @@ class OzonePlatformGbm |
| void AddInterfaces(shell::InterfaceRegistry* registry) override { |
| registry->AddInterface<ozone::mojom::DeviceCursor>(this); |
| } |
| - // shell::InterfaceFactory<mojom::ozone::Cursor> implementation. |
| + // shell::InterfaceFactory<ozone::mojom::DeviceCursor> implementation. |
| void Create(const shell::Identity& remote_identity, |
| ozone::mojom::DeviceCursorRequest request) override { |
| - DCHECK(drm_thread_proxy_); |
| - drm_thread_proxy_->AddBinding(std::move(request)); |
| + if (drm_thread_proxy_) |
|
rjkroege
2016/09/25 19:09:43
Does the DCHECK actually fire in practice? This su
sadrul
2016/09/25 20:44:35
After https://codereview.chromium.org/2366623002/,
rjkroege
2016/09/25 21:55:56
ah. Can you add a TODO then.
|
| + drm_thread_proxy_->AddBinding(std::move(request)); |
| + else |
| + pending_cursor_requests_.push_back(std::move(request)); |
| } |
| std::unique_ptr<PlatformWindow> CreatePlatformWindow( |
| PlatformWindowDelegate* delegate, |
| @@ -235,6 +237,9 @@ class OzonePlatformGbm |
| if (using_mojo_ || single_process_) { |
| mus_thread_proxy_->StartDrmThread(); |
| } |
| + for (auto& request : pending_cursor_requests_) |
| + drm_thread_proxy_->AddBinding(std::move(request)); |
| + pending_cursor_requests_.clear(); |
| } |
| private: |
| @@ -246,6 +251,7 @@ class OzonePlatformGbm |
| std::unique_ptr<GlApiLoader> gl_api_loader_; |
| std::unique_ptr<GbmSurfaceFactory> surface_factory_; |
| scoped_refptr<IPC::MessageFilter> gpu_message_filter_; |
| + std::vector<ozone::mojom::DeviceCursorRequest> pending_cursor_requests_; |
| // Objects in the Browser process. |
| std::unique_ptr<DeviceManager> device_manager_; |