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

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: Rebaselined to 160422. Created 8 years, 2 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
« no previous file with comments | « cc/CCLayerTreeHost.cpp ('k') | cc/CCLayerTreeHostImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCLayerTreeHostCommon.cpp
===================================================================
--- cc/CCLayerTreeHostCommon.cpp (revision 160422)
+++ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698