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

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

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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
« no previous file with comments | « ui/gfx/geometry/point_unittest.cc ('k') | ui/ozone/platform/drm/host/drm_window_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ecbbe52b64a4c60c0ec4da865ea7eb7f9fe953c9..f8d399d36e13eca29a5920edadddcf41a8784e41 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));
« no previous file with comments | « ui/gfx/geometry/point_unittest.cc ('k') | ui/ozone/platform/drm/host/drm_window_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698