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

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

Issue 2156093004: Use mojo for cursor control in ozone drm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 5 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.h
diff --git a/ui/ozone/platform/drm/host/drm_cursor.h b/ui/ozone/platform/drm/host/drm_cursor.h
index f8a6bfd5aecc52c2119c49b4d41ce0a17579e1b7..ea2794ad21a0974ff6b05eb947d267f78b4c45d5 100644
--- a/ui/ozone/platform/drm/host/drm_cursor.h
+++ b/ui/ozone/platform/drm/host/drm_cursor.h
@@ -30,9 +30,12 @@ class DrmCursorProxy {
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& point,
int frame_delay_ms) = 0;
- // Moves the cursor in |window| to |point|
+ // Moves the cursor in |window| to |point|, callable from the ui thread.
virtual void Move(gfx::AcceleratedWidget window, const gfx::Point& point) = 0;
+ // Moves the cursor in |window| to |point|, callable from the EvdevThread.
+ virtual void MoveEvdev(gfx::AcceleratedWidget window,
+ const gfx::Point& point) = 0;
// Initialize EvdevThread-specific state.
virtual void InitializeOnEvdev() = 0;
};
@@ -73,17 +76,21 @@ class DrmCursor : public CursorDelegateEvdev {
void InitializeOnEvdev() override;
private:
+ enum ThreadType { UI, EVDEV };
+
void SetCursorLocationLocked(const gfx::PointF& location);
void SendCursorShowLocked();
void SendCursorHideLocked();
- void SendCursorMoveLocked();
+ void SendCursorMoveLocked(ThreadType tt);
// Lock-testing helpers.
void CursorSetLockTested(gfx::AcceleratedWidget window,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& point,
int frame_delay_ms);
- void MoveLockTested(gfx::AcceleratedWidget window, const gfx::Point& point);
+ void MoveLockTested(ThreadType thread_type,
+ gfx::AcceleratedWidget window,
+ const gfx::Point& point);
// The mutex synchronizing this object.
base::Lock lock_;

Powered by Google App Engine
This is Rietveld 408576698