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

Unified Diff: ash/magnifier/magnification_controller.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-gfx: . Created 5 years, 3 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: ash/magnifier/magnification_controller.cc
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index cb7737653dcb2ad6c3145773477ece13630d3af6..31cd83158a6f32181bb532a37910dead2384a56f 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -68,7 +68,7 @@ const int kCursorPanningMargin = 100;
const int kCaretPanningMargin = 50;
void MoveCursorTo(aura::WindowTreeHost* host, const gfx::Point& root_location) {
- gfx::Point3F host_location_3f(root_location);
+ auto host_location_3f = gfx::Point3F(gfx::PointF(root_location));
host->GetRootTransform().TransformPoint(&host_location_3f);
host->MoveCursorToHostLocation(
gfx::ToCeiledPoint(host_location_3f.AsPointF()));
@@ -568,7 +568,7 @@ void MagnificationControllerImpl::MoveWindow(int x, int y, bool animate) {
if (!is_enabled_)
return;
- Redraw(gfx::Point(x, y), scale_, animate);
+ Redraw(gfx::PointF(x, y), scale_, animate);
}
void MagnificationControllerImpl::MoveWindow(const gfx::Point& point,
@@ -576,7 +576,7 @@ void MagnificationControllerImpl::MoveWindow(const gfx::Point& point,
if (!is_enabled_)
return;
- Redraw(point, scale_, animate);
+ Redraw(gfx::PointF(point), scale_, animate);
}
void MagnificationControllerImpl::SetScrollDirection(
@@ -724,7 +724,7 @@ void MagnificationControllerImpl::MoveMagnifierWindowFollowPoint(
}
int y = top + y_diff;
if (start_zoom && !is_on_animation_) {
- bool ret = RedrawDIP(gfx::Point(x, y), scale_,
+ bool ret = RedrawDIP(gfx::PointF(x, y), scale_,
0, // No animation on panning.
kDefaultAnimationTweenType);
@@ -746,9 +746,9 @@ void MagnificationControllerImpl::MoveMagnifierWindowCenterPoint(
if (!is_on_animation_) {
// With animation on panning.
- RedrawDIP(window_rect.origin() + (point - window_rect.CenterPoint()),
- scale_, kDefaultAnimationDurationInMs,
- kCenterCaretAnimationTweenType);
+ RedrawDIP(
+ gfx::PointF(window_rect.origin() + (point - window_rect.CenterPoint())),
+ scale_, kDefaultAnimationDurationInMs, kCenterCaretAnimationTweenType);
}
}
@@ -785,7 +785,7 @@ void MagnificationControllerImpl::MoveMagnifierWindowFollowRect(
root_window_->layer()->GetAnimator()->StopAnimating();
is_on_animation_ = false;
}
- RedrawDIP(gfx::Point(x, y), scale_,
+ RedrawDIP(gfx::PointF(x, y), scale_,
0, // No animation on panning.
kDefaultAnimationTweenType);
}

Powered by Google App Engine
This is Rietveld 408576698