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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11364189: cc: Clean up PageScaleAnimation for readability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing gfx:: Created 8 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 | « cc/layer_tree_host_impl.h ('k') | cc/page_scale_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index b39dec98f5de1a1228245a931b8077c5d0205395..99c1fad1753decab4d1360c39ecea14e2dd9699a 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -288,7 +288,7 @@ void LayerTreeHostImpl::animate(base::TimeTicks monotonicTime, base::Time wallCl
animateScrollbars(monotonicTime);
}
-void LayerTreeHostImpl::startPageScaleAnimation(gfx::Vector2d targetPosition, bool anchorPoint, float pageScale, base::TimeTicks startTime, base::TimeDelta duration)
+void LayerTreeHostImpl::startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchorPoint, float pageScale, base::TimeTicks startTime, base::TimeDelta duration)
{
if (!m_rootScrollLayerImpl)
return;
@@ -305,15 +305,15 @@ void LayerTreeHostImpl::startPageScaleAnimation(gfx::Vector2d targetPosition, bo
m_pageScaleAnimation = PageScaleAnimation::create(scrollTotal, m_pinchZoomViewport.totalPageScaleFactor(), viewportSize, scaledContentSize, startTimeSeconds);
if (anchorPoint) {
- gfx::Vector2dF anchor(targetPosition);
+ gfx::Vector2dF anchor(targetOffset);
if (!Settings::pageScalePinchZoomEnabled())
anchor.Scale(1 / pageScale);
m_pageScaleAnimation->zoomWithAnchor(anchor, pageScale, duration.InSecondsF());
} else {
- gfx::Vector2dF scaledTargetPosition = targetPosition;
+ gfx::Vector2dF scaledTargetOffset = targetOffset;
if (!Settings::pageScalePinchZoomEnabled())
- scaledTargetPosition.Scale(1 / pageScale);
- m_pageScaleAnimation->zoomTo(scaledTargetPosition, pageScale, duration.InSecondsF());
+ scaledTargetOffset.Scale(1 / pageScale);
+ m_pageScaleAnimation->zoomTo(scaledTargetOffset, pageScale, duration.InSecondsF());
}
m_client->setNeedsRedrawOnImplThread();
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/page_scale_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698