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

Unified Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 2369593002: ozone: Allow cursor requests to come in before the drm thread comes up. (Closed)
Patch Set: todo Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9a97e0a8cbbafce304603969085674a818a2e547 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_)
+ 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,8 @@ class OzonePlatformGbm
std::unique_ptr<GlApiLoader> gl_api_loader_;
std::unique_ptr<GbmSurfaceFactory> surface_factory_;
scoped_refptr<IPC::MessageFilter> gpu_message_filter_;
+ // TODO(sad): Once the mus gpu process split happens, this can go away.
+ std::vector<ozone::mojom::DeviceCursorRequest> pending_cursor_requests_;
// Objects in the Browser process.
std::unique_ptr<DeviceManager> device_manager_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698