Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 1a4c876d61c5ed75346e308a495a2cf73af9b609..4ae839c3d441f33a8e6f23b13e346e6f603bfebd 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -596,7 +596,18 @@ SkSpecialImage* SkImageFilter::filterInput(int index, |
return SkRef(src); |
} |
- return input->filterImage(src, this->mapContext(ctx), offset); |
+ SkAutoTUnref<SkSpecialImage> result(input->filterImage(src, this->mapContext(ctx), offset)); |
+ |
+#if SK_SUPPORT_GPU |
+ if (src->peekTexture() && result && !result->peekTexture()) { |
+ // Keep the result on the GPU - this is still required for some |
+ // image filters that don't support GPU in all cases |
+ GrContext* context = src->peekTexture()->getContext(); |
+ return result->makeTextureImage(src->internal_getProxy(), context).release(); |
+ } |
+#endif |
+ |
+ return result.release(); |
} |
#if SK_SUPPORT_GPU |