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

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp

Issue 10829322: Merge 125486 - [chromium] renderSurface in incorrect space if owning layer has empty but non-zero b… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 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 | « no previous file | Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (revision 125578)
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (working copy)
@@ -546,10 +546,10 @@
// The drawTransform that gets computed below is effectively the layer's drawTransform, unless
// the layer itself creates a renderSurface. In that case, the renderSurface re-parents the transforms.
WebTransformationMatrix drawTransform = combinedTransform;
+ // M[draw] = M[parent] * LT * Tr[anchor2center] * Tr[center2origin]
+ drawTransform.translate(-layer->bounds().width() / 2.0, -layer->bounds().height() / 2.0);
if (!layer->contentBounds().isEmpty() && !layer->bounds().isEmpty()) {
- // M[draw] = M[parent] * LT * Tr[anchor2center] * Tr[center2anchor]
- drawTransform.translate(-layer->bounds().width() / 2.0, -layer->bounds().height() / 2.0);
- // M[draw] = M[parent] * LT * Tr[anchor2origin] * S[content2layer]
+ // M[draw] = M[parent] * LT * Tr[anchor2origin] * S[layer2content]
drawTransform.scaleNonUniform(layer->bounds().width() / static_cast<double>(layer->contentBounds().width()),
layer->bounds().height() / static_cast<double>(layer->contentBounds().height()));
}
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698