diff options
Diffstat (limited to 'ui/ozone/platform/drm/host/drm_cursor.cc')
-rw-r--r-- | ui/ozone/platform/drm/host/drm_cursor.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/ozone/platform/drm/host/drm_cursor.cc b/ui/ozone/platform/drm/host/drm_cursor.cc index ecbbe52..f8d399d 100644 --- a/ui/ozone/platform/drm/host/drm_cursor.cc +++ b/ui/ozone/platform/drm/host/drm_cursor.cc @@ -58,7 +58,7 @@ void DrmCursor::OnWindowAdded(gfx::AcceleratedWidget window, state_.window = window; state_.display_bounds_in_screen = bounds_in_screen; state_.confined_bounds = cursor_confined_bounds; - SetCursorLocationLocked(cursor_confined_bounds.CenterPoint()); + SetCursorLocationLocked(gfx::PointF(cursor_confined_bounds.CenterPoint())); } } @@ -74,13 +74,14 @@ void DrmCursor::OnWindowRemoved(gfx::AcceleratedWidget window) { state_.window = dest_window->GetAcceleratedWidget(); state_.display_bounds_in_screen = dest_window->GetBounds(); state_.confined_bounds = dest_window->GetCursorConfinedBounds(); - SetCursorLocationLocked(state_.confined_bounds.CenterPoint()); + SetCursorLocationLocked( + gfx::PointF(state_.confined_bounds.CenterPoint())); SendCursorShowLocked(); } else { state_.window = gfx::kNullAcceleratedWidget; state_.display_bounds_in_screen = gfx::Rect(); state_.confined_bounds = gfx::Rect(); - state_.location = gfx::Point(); + state_.location = gfx::PointF(); } } } @@ -206,7 +207,7 @@ void DrmCursor::SetCursorLocationLocked(const gfx::PointF& location) { state_.lock.AssertAcquired(); gfx::PointF clamped_location = location; - clamped_location.SetToMax(state_.confined_bounds.origin()); + clamped_location.SetToMax(gfx::PointF(state_.confined_bounds.origin())); // Right and bottom edges are exclusive. clamped_location.SetToMin(gfx::PointF(state_.confined_bounds.right() - 1, state_.confined_bounds.bottom() - 1)); |