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

Unified Diff: src/effects/SkRectShaderImageFilter.cpp

Issue 184973007: Fix CTM scaling and clipping of SkRectShaderImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Leanr ot ytpe Created 6 years, 10 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 | « src/effects/SkPerlinNoiseShader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkRectShaderImageFilter.cpp
diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp
index 18e38470bc9ba3f5e907ae8e3fcade472f0a1c9d..27b39d7fb1dde27fb3926738b5df9edd570af91c 100644
--- a/src/effects/SkRectShaderImageFilter.cpp
+++ b/src/effects/SkRectShaderImageFilter.cpp
@@ -69,8 +69,8 @@ bool SkRectShaderImageFilter::onFilterImage(Proxy* proxy,
SkCanvas canvas(device.get());
SkPaint paint;
paint.setShader(fShader);
- SkMatrix matrix;
- matrix.setTranslate(-SkIntToScalar(bounds.fLeft), -SkIntToScalar(bounds.fTop));
+ SkMatrix matrix(ctm);
+ matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top()));
fShader->setLocalMatrix(matrix);
SkRect rect = SkRect::MakeWH(SkIntToScalar(bounds.width()), SkIntToScalar(bounds.height()));
canvas.drawRect(rect, paint);
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698