Index: src/effects/SkDisplacementMapEffect.cpp |
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
index 4be8d7735184e11319e933e4cc8f867f38c2286a..387877941d362d66ebd9c3c4d9ba61719f63f90f 100644 |
--- a/src/effects/SkDisplacementMapEffect.cpp |
+++ b/src/effects/SkDisplacementMapEffect.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SkDisplacementMapEffect.h" |
+#include "SkDevice.h" |
#include "SkReadBuffer.h" |
#include "SkWriteBuffer.h" |
#include "SkUnPreMultiply.h" |
@@ -239,9 +240,12 @@ bool SkDisplacementMapEffect::onFilterImage(Proxy* proxy, |
return false; |
} |
- if (!dst->tryAllocPixels(color.info().makeWH(bounds.width(), bounds.height()))) { |
+ SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(bounds.width(), bounds.height())); |
+ if (!device) { |
return false; |
} |
+ *dst = device->accessBitmap(false); |
+ SkAutoLockPixels alp_dst(*dst); |
SkVector scale = SkVector::Make(fScale, fScale); |
ctx.ctm().mapVectors(&scale, 1); |