Index: src/effects/SkPictureImageFilter.cpp |
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp |
index 0c95b328c0f8d44f4d6e7f76b34288effa5767ef..da5597d69905385bb4fc610cd22aa60735b72724 100644 |
--- a/src/effects/SkPictureImageFilter.cpp |
+++ b/src/effects/SkPictureImageFilter.cpp |
@@ -9,6 +9,7 @@ |
#include "SkDevice.h" |
#include "SkCanvas.h" |
#include "SkReadBuffer.h" |
+#include "SkSurfaceProps.h" |
#include "SkWriteBuffer.h" |
#include "SkValidationUtils.h" |
@@ -97,8 +98,10 @@ bool SkPictureImageFilter::onFilterImage(Proxy* proxy, const SkBitmap&, const Co |
return false; |
} |
- SkCanvas canvas(device.get()); |
- SkPaint paint; |
+ // Pass explicit surface props, as the simplified canvas constructor discards device properties. |
+ // FIXME: switch back to the public constructor (and unfriend) after |
+ // https://code.google.com/p/skia/issues/detail?id=3142 is fixed. |
+ SkCanvas canvas(device.get(), proxy->surfaceProps(), SkCanvas::kDefault_InitFlags); |
canvas.translate(-SkIntToScalar(bounds.fLeft), -SkIntToScalar(bounds.fTop)); |
canvas.concat(ctx.ctm()); |