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

Unified Diff: cc/layers/viewport.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: cc/layers/viewport.cc
diff --git a/cc/layers/viewport.cc b/cc/layers/viewport.cc
index 80e711fd027db3979b9d2098ce5578ff6e911685..e53a716fbc935b46240e087fe82a2170219d1792 100644
--- a/cc/layers/viewport.cc
+++ b/cc/layers/viewport.cc
@@ -99,11 +99,11 @@ void Viewport::PinchUpdate(float magnify_delta, const gfx::Point& anchor) {
gfx::Point adjusted_anchor = anchor + pinch_anchor_adjustment_;
float page_scale = active_tree->current_page_scale_factor();
gfx::PointF previous_scale_anchor =
- gfx::ScalePoint(adjusted_anchor, 1.f / page_scale);
+ gfx::ScalePoint(gfx::PointF(adjusted_anchor), 1.f / page_scale);
active_tree->SetPageScaleOnActiveTree(page_scale * magnify_delta);
page_scale = active_tree->current_page_scale_factor();
gfx::PointF new_scale_anchor =
- gfx::ScalePoint(adjusted_anchor, 1.f / page_scale);
+ gfx::ScalePoint(gfx::PointF(adjusted_anchor), 1.f / page_scale);
gfx::Vector2dF move = previous_scale_anchor - new_scale_anchor;
// Scale back to viewport space since that's the coordinate space ScrollBy

Powered by Google App Engine
This is Rietveld 408576698