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

Unified Diff: Source/platform/graphics/skia/NativeImageSkia.cpp

Issue 223673003: Improve computation of ctmScale{X,Y} in NativeImageSkia::drawPattern (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop trailing WS. Created 6 years, 9 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 | « LayoutTests/fast/transforms/mirror-transform-tiled-scaled-background-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/skia/NativeImageSkia.cpp
diff --git a/Source/platform/graphics/skia/NativeImageSkia.cpp b/Source/platform/graphics/skia/NativeImageSkia.cpp
index f9ed9b6beb100e1c1dbb5323251aac4327af9e69..87133033551e0ef46d2deea75435487fbe9e6cbe 100644
--- a/Source/platform/graphics/skia/NativeImageSkia.cpp
+++ b/Source/platform/graphics/skia/NativeImageSkia.cpp
@@ -451,8 +451,9 @@ void NativeImageSkia::drawPattern(
return; // nothing to draw
SkMatrix totalMatrix = context->getTotalMatrix();
- SkScalar ctmScaleX = totalMatrix.getScaleX();
- SkScalar ctmScaleY = totalMatrix.getScaleY();
+ AffineTransform ctm = context->getCTM();
+ SkScalar ctmScaleX = ctm.xScale();
+ SkScalar ctmScaleY = ctm.yScale();
totalMatrix.preScale(scale.width(), scale.height());
// Figure out what size the bitmap will be in the destination. The
« no previous file with comments | « LayoutTests/fast/transforms/mirror-transform-tiled-scaled-background-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698