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

Unified Diff: src/effects/SkRectShaderImageFilter.cpp

Issue 279563002: hide get/setLocalMatrix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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/core/SkShader.cpp ('k') | src/pdf/SkPDFDeviceFlattener.cpp » ('j') | 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 13e59c2c278177178a514dc77d3a19e8689b7d0f..bed017c32607c4bfbb71349de56e27bf6f6cbf01 100644
--- a/src/effects/SkRectShaderImageFilter.cpp
+++ b/src/effects/SkRectShaderImageFilter.cpp
@@ -66,13 +66,15 @@ bool SkRectShaderImageFilter::onFilterImage(Proxy* proxy,
return false;
}
SkCanvas canvas(device.get());
+
SkPaint paint;
- paint.setShader(fShader);
SkMatrix matrix(ctx.ctm());
matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top()));
- fShader->setLocalMatrix(matrix);
+ paint.setShader(SkShader::CreateLocalMatrixShader(fShader, matrix))->unref();
+
SkRect rect = SkRect::MakeWH(SkIntToScalar(bounds.width()), SkIntToScalar(bounds.height()));
canvas.drawRect(rect, paint);
+
*result = device.get()->accessBitmap(false);
offset->fX = bounds.fLeft;
offset->fY = bounds.fTop;
« no previous file with comments | « src/core/SkShader.cpp ('k') | src/pdf/SkPDFDeviceFlattener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698