Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 374a561030254561941ecf21e67d4a65cdfffe80..f7662c6e75fe5353bdafbcc1466ac93cebab0803 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -593,7 +593,16 @@ 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 (src->peekTexture() && !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(); |
+ result.reset(result->makeTextureImage(src->internal_getProxy(), context)); |
+ } |
+ |
+ return result.release(); |
} |
#if SK_SUPPORT_GPU |