Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 91b3bc3d4afad1efc7da7a6e95ded8cf3752a82b..f5122040e951025261dec832a1016d3048429588 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -523,3 +523,26 @@ SkImageFilter::Cache* SkImageFilter::Cache::Get() { |
void SkImageFilter::PurgeCache() { |
cache.get()->purge(); |
} |
+ |
+/////////////////////////////////////////////////////////////////////////////////////////////////// |
+ |
+#include "SkBitmapDevice.h" |
Stephen White
2015/06/09 15:17:04
Nit: move this to top-of-file?
|
+ |
+SkBaseDevice* SkImageFilter::Proxy::createDevice(int w, int h) { |
+ SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h), |
robertphillips
2015/06/09 17:07:29
What about the SkTileImageFilter?
Stephen White
2015/06/10 14:42:45
SkTileImageFilter always does an extractSubset() o
|
+ SkBaseDevice::kNever_TileUsage, |
+ kUnknown_SkPixelGeometry, |
+ true /*forImageFilter*/); |
+ SkBaseDevice* dev = fDevice->onCreateDevice(cinfo, NULL); |
robertphillips
2015/06/09 17:07:29
!dev ?
|
+ if (NULL == dev) { |
+ dev = SkBitmapDevice::Create(cinfo.fInfo); |
+ } |
+ return dev; |
+} |
+ |
+bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitmap& src, |
+ const SkImageFilter::Context& ctx, |
+ SkBitmap* result, SkIPoint* offset) { |
+ return fDevice->filterImage(filter, src, ctx, result, offset); |
+} |
+ |