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; |