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

Unified Diff: ui/ozone/platform/drm/host/drm_cursor.cc

Issue 2088533002: Refactor ozone drm cursor code for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 6ee48c8cfa06983c58c90ce306658022b96d6ac9..9f125594fb609a128203aaf69c657d1a187a1ae8 100644
--- a/ui/ozone/platform/drm/host/drm_cursor.cc
+++ b/ui/ozone/platform/drm/host/drm_cursor.cc
@@ -27,6 +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() {}
private:
DISALLOW_COPY_AND_ASSIGN(NullProxy);
@@ -177,6 +178,7 @@ void DrmCursor::MoveCursorTo(const gfx::PointF& screen_location) {
}
void DrmCursor::MoveCursor(const gfx::Vector2dF& delta) {
+ DCHECK(evdev_thread_checker_.CalledOnValidThread());
TRACE_EVENT0("drmcursor", "DrmCursor::MoveCursor");
base::AutoLock lock(lock_);
@@ -210,6 +212,11 @@ gfx::Rect DrmCursor::GetCursorConfinedBounds() {
return confined_bounds_ + display_bounds_in_screen_.OffsetFromOrigin();
}
+void DrmCursor::InitializeOnEvdev() {
+ evdev_thread_checker_.DetachFromThread();
dnicoara 2016/06/21 14:14:16 Unless this is not called on the evdev thread you
rjkroege 2016/06/21 17:20:52 The evdev_thread_checker_ is initialized on the ma
dnicoara 2016/06/21 17:38:18 Ah, I see your reasoning. My understanding is that
+ proxy_->InitializeOnEvdev();
+}
+
void DrmCursor::SetCursorLocationLocked(const gfx::PointF& location) {
gfx::PointF clamped_location = location;
clamped_location.SetToMax(gfx::PointF(confined_bounds_.origin()));

Powered by Google App Engine
This is Rietveld 408576698