Index: src/core/SkDeviceImageFilterProxy.h |
diff --git a/src/core/SkDeviceImageFilterProxy.h b/src/core/SkDeviceImageFilterProxy.h |
index dcf12f7c4016d1564f92a9cd707c6ca68b3cabbe..79ff957564c48af5661dff3e3e5d0296499e2070 100644 |
--- a/src/core/SkDeviceImageFilterProxy.h |
+++ b/src/core/SkDeviceImageFilterProxy.h |
@@ -8,6 +8,7 @@ |
#ifndef SkDeviceImageFilterProxy_DEFINED |
#define SkDeviceImageFilterProxy_DEFINED |
+#include "SkBitmapDevice.h" |
#include "SkDevice.h" |
#include "SkImageFilter.h" |
#include "SkSurfaceProps.h" |
@@ -24,7 +25,11 @@ public: |
SkBaseDevice::kNever_TileUsage, |
kUnknown_SkPixelGeometry, |
true /*forImageFilter*/); |
- return fDevice->onCreateDevice(cinfo, NULL); |
+ SkBaseDevice* dev = fDevice->onCreateDevice(cinfo, NULL); |
+ if (NULL == dev) { |
+ dev = SkBitmapDevice::Create(cinfo.fInfo); |
+ } |
+ return dev; |
} |
bool canHandleImageFilter(const SkImageFilter* filter) override { |
return fDevice->canHandleImageFilter(filter); |