Chromium Code Reviews| 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..ab82f53089f150626f8fcd25f502a193c62190f9 100644 |
| --- a/ui/ozone/platform/drm/host/drm_cursor.cc |
| +++ b/ui/ozone/platform/drm/host/drm_cursor.cc |
| @@ -27,6 +27,8 @@ class NullProxy : public DrmCursorProxy { |
| const gfx::Point& point, |
| int frame_delay_ms) override {} |
| void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override {} |
| + void MoveEvdev(gfx::AcceleratedWidget window, |
| + const gfx::Point& point) override {} |
| void InitializeOnEvdev() override {} |
| private: |
| @@ -163,7 +165,7 @@ void DrmCursor::MoveCursorTo(gfx::AcceleratedWidget window, |
| if (window != old_window) |
| SendCursorShowLocked(); |
| else |
| - SendCursorMoveLocked(); |
| + SendCursorMoveLocked(UI); |
| } |
| void DrmCursor::MoveCursorTo(const gfx::PointF& screen_location) { |
| @@ -176,7 +178,7 @@ void DrmCursor::MoveCursorTo(const gfx::PointF& screen_location) { |
| SetCursorLocationLocked(screen_location - |
| display_bounds_in_screen_.OffsetFromOrigin()); |
| - SendCursorMoveLocked(); |
| + SendCursorMoveLocked(UI); |
|
spang
2016/07/22 19:52:54
Assuming MoveCursorTo() is called from UI is broke
|
| } |
| void DrmCursor::MoveCursor(const gfx::Vector2dF& delta) { |
| @@ -196,7 +198,7 @@ void DrmCursor::MoveCursor(const gfx::Vector2dF& delta) { |
| #else |
| SetCursorLocationLocked(location_ + delta); |
| #endif |
| - SendCursorMoveLocked(); |
| + SendCursorMoveLocked(EVDEV); |
| } |
| bool DrmCursor::IsCursorVisible() { |
| @@ -242,10 +244,10 @@ void DrmCursor::SendCursorHideLocked() { |
| CursorSetLockTested(window_, std::vector<SkBitmap>(), gfx::Point(), 0); |
| } |
| -void DrmCursor::SendCursorMoveLocked() { |
| +void DrmCursor::SendCursorMoveLocked(ThreadType thread_type) { |
| if (!bitmap_) |
| return; |
| - MoveLockTested(window_, GetBitmapLocationLocked()); |
| + MoveLockTested(thread_type, window_, GetBitmapLocationLocked()); |
| } |
| // Lock-testing helpers. |
| @@ -257,10 +259,14 @@ void DrmCursor::CursorSetLockTested(gfx::AcceleratedWidget window, |
| proxy_->CursorSet(window, bitmaps, point, frame_delay_ms); |
| } |
| -void DrmCursor::MoveLockTested(gfx::AcceleratedWidget window, |
| +void DrmCursor::MoveLockTested(ThreadType thread_type, |
| + gfx::AcceleratedWidget window, |
| const gfx::Point& point) { |
| lock_.AssertAcquired(); |
| - proxy_->Move(window, point); |
| + if (thread_type == EVDEV) |
| + proxy_->MoveEvdev(window, point); |
| + else |
| + proxy_->Move(window, point); |
| } |