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

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

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: simpler patch Created 3 years, 6 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 | « ui/ozone/platform/drm/mus_thread_proxy.cc ('k') | 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 1ae295d777fd4b1d1a6af312d4aec95f9e35e65d..a324681b57500e657d247285bbc2abee1e91b63f 100644
--- a/ui/ozone/platform/drm/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/drm/ozone_platform_gbm.cc
@@ -124,8 +124,6 @@ class OzonePlatformGbm : public OzonePlatform {
const gfx::Rect& bounds) override {
GpuThreadAdapter* adapter = gpu_platform_support_host_.get();
if (using_mojo_ || single_process_) {
- DCHECK(drm_thread_proxy_)
- << "drm_thread_proxy_ should exist (and be running) here.";
adapter = mus_thread_proxy_.get();
}
@@ -176,15 +174,13 @@ class OzonePlatformGbm : public OzonePlatform {
gl_api_loader_.reset(new GlApiLoader());
if (using_mojo_) {
- DCHECK(args.connector);
- mus_thread_proxy_.reset(new MusThreadProxy());
+ mus_thread_proxy_ =
+ base::MakeUnique<MusThreadProxy>(cursor_.get(), args.connector);
adapter = mus_thread_proxy_.get();
- cursor_->SetDrmCursorProxy(new CursorProxyMojo(args.connector));
} else if (single_process_) {
- mus_thread_proxy_.reset(new MusThreadProxy());
+ mus_thread_proxy_ =
+ base::MakeUnique<MusThreadProxy>(cursor_.get(), nullptr);
adapter = mus_thread_proxy_.get();
- cursor_->SetDrmCursorProxy(
- new CursorProxyThread(mus_thread_proxy_.get()));
} else {
gpu_platform_support_host_.reset(
new DrmGpuPlatformSupportHost(cursor_.get()));
« no previous file with comments | « ui/ozone/platform/drm/mus_thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698