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

Unified Diff: cc/CCLayerTreeHostCommon.cpp

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Change m_unpinchedViewportSize and remove unnecessary >1 page scale clamping. Created 8 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/CCLayerTreeHostCommon.cpp
===================================================================
--- cc/CCLayerTreeHostCommon.cpp (revision 159486)
+++ cc/CCLayerTreeHostCommon.cpp (working copy)
@@ -271,7 +271,7 @@
//
WebTransformationMatrix partialLayerOriginTransform = parentMatrix;
- partialLayerOriginTransform.scale(scrollingLayer->pageScaleDelta());
+ partialLayerOriginTransform.multiply(scrollingLayer->implTransform());
WebTransformationMatrix scrollCompensationForThisLayer = partialLayerOriginTransform; // Step 3
scrollCompensationForThisLayer.translate(scrollingLayer->scrollDelta().width(), scrollingLayer->scrollDelta().height()); // Step 2
@@ -468,13 +468,13 @@
float centerOffsetY = (0.5 - anchorPoint.y()) * bounds.height();
WebTransformationMatrix layerLocalTransform;
- // LT = S[pageScaleDelta]
- layerLocalTransform.scale(layer->pageScaleDelta());
- // LT = S[pageScaleDelta] * Tr[origin] * Tr[origin2anchor]
+ // LT = M[impl transformation]
+ layerLocalTransform.multiply(layer->implTransform());
+ // LT = M[impl transformation] * Tr[origin] * Tr[origin2anchor]
layerLocalTransform.translate3d(position.x() + anchorPoint.x() * bounds.width(), position.y() + anchorPoint.y() * bounds.height(), layer->anchorPointZ());
- // LT = S[pageScaleDelta] * Tr[origin] * Tr[origin2anchor] * M[layer]
+ // LT = M[impl transformation] * Tr[origin] * Tr[origin2anchor] * M[layer]
layerLocalTransform.multiply(layer->transform());
- // LT = S[pageScaleDelta] * Tr[origin] * Tr[origin2anchor] * M[layer] * Tr[anchor2center]
+ // LT = M[impl transformation] * Tr[origin] * Tr[origin2anchor] * M[layer] * Tr[anchor2center]
layerLocalTransform.translate3d(centerOffsetX, centerOffsetY, -layer->anchorPointZ());
WebTransformationMatrix combinedTransform = parentMatrix;
« no previous file with comments | « cc/CCLayerTreeHost.cpp ('k') | cc/CCLayerTreeHostImpl.h » ('j') | cc/CCLayerTreeHostImplTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698