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

Unified Diff: ui/ozone/platform/drm/gpu/drm_thread.cc

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: added todo Created 3 years, 7 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 | ui/ozone/platform/drm/mus_thread_proxy.cc » ('j') | ui/ozone/platform/drm/mus_thread_proxy.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_thread.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_thread.cc b/ui/ozone/platform/drm/gpu/drm_thread.cc
index 8eaaeee1deb0a83efeccac5a07ad8781784f111c..5aca48d7a8077f5953730b62259880fa9ed0e075 100644
--- a/ui/ozone/platform/drm/gpu/drm_thread.cc
+++ b/ui/ozone/platform/drm/gpu/drm_thread.cc
@@ -207,8 +207,12 @@ void DrmThread::SetCursor(const gfx::AcceleratedWidget& widget,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& location,
int32_t frame_delay_ms) {
- screen_manager_->GetWindow(widget)
- ->SetCursor(bitmaps, location, frame_delay_ms);
+ auto window = screen_manager_->GetWindow(widget);
sadrul 2017/05/29 16:50:15 I think we suggest using 'auto*' here.
+ // TODO(rjkroege): This check is needed only to address mushrome startup
dnicoara 2017/05/29 17:01:54 Why isn't the |drm_thread_| check enough for this
+ // synchronization issues. Remove as part of http://crbug.com/581462
+ if (!window)
+ return;
+ window->SetCursor(bitmaps, location, frame_delay_ms);
}
void DrmThread::MoveCursor(const gfx::AcceleratedWidget& widget,
« no previous file with comments | « no previous file | ui/ozone/platform/drm/mus_thread_proxy.cc » ('j') | ui/ozone/platform/drm/mus_thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698