Index: src/effects/SkRectShaderImageFilter.cpp |
diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp |
index bed017c32607c4bfbb71349de56e27bf6f6cbf01..13e59c2c278177178a514dc77d3a19e8689b7d0f 100644 |
--- a/src/effects/SkRectShaderImageFilter.cpp |
+++ b/src/effects/SkRectShaderImageFilter.cpp |
@@ -66,15 +66,13 @@ |
return false; |
} |
SkCanvas canvas(device.get()); |
- |
SkPaint paint; |
+ paint.setShader(fShader); |
SkMatrix matrix(ctx.ctm()); |
matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top())); |
- paint.setShader(SkShader::CreateLocalMatrixShader(fShader, matrix))->unref(); |
- |
+ fShader->setLocalMatrix(matrix); |
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; |