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

Unified Diff: ui/ozone/platform/drm/host/drm_cursor.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
Index: ui/ozone/platform/drm/host/drm_cursor.cc
diff --git a/ui/ozone/platform/drm/host/drm_cursor.cc b/ui/ozone/platform/drm/host/drm_cursor.cc
index 0dc9ae53704110228670e2087b8f89db860da8bc..62261391220eac7874849c5a3a3a2fdb3ec9a2aa 100644
--- a/ui/ozone/platform/drm/host/drm_cursor.cc
+++ b/ui/ozone/platform/drm/host/drm_cursor.cc
@@ -27,7 +27,7 @@ class NullProxy : public DrmCursorProxy {
const gfx::Point& point,
int frame_delay_ms) override {}
void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override {}
- void InitializeOnEvdev() override {}
+ void InitializeOnEvdevIfNecessary() override {}
private:
DISALLOW_COPY_AND_ASSIGN(NullProxy);
@@ -44,11 +44,11 @@ DrmCursor::DrmCursor(DrmWindowHostManager* window_manager)
DrmCursor::~DrmCursor() {}
-void DrmCursor::SetDrmCursorProxy(DrmCursorProxy* proxy) {
+void DrmCursor::SetDrmCursorProxy(std::unique_ptr<DrmCursorProxy> proxy) {
TRACE_EVENT0("drmcursor", "DrmCursor::SetDrmCursorProxy");
DCHECK(thread_checker_.CalledOnValidThread());
base::AutoLock lock(lock_);
- proxy_.reset(proxy);
+ proxy_ = std::move(proxy);
}
void DrmCursor::ResetDrmCursorProxy() {
@@ -216,7 +216,7 @@ gfx::Rect DrmCursor::GetCursorConfinedBounds() {
void DrmCursor::InitializeOnEvdev() {
DCHECK(evdev_thread_checker_.CalledOnValidThread());
- proxy_->InitializeOnEvdev();
+ proxy_->InitializeOnEvdevIfNecessary();
}
void DrmCursor::SetCursorLocationLocked(const gfx::PointF& location) {
« no previous file with comments | « ui/ozone/platform/drm/host/drm_cursor.h ('k') | ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698