Chromium Code Reviews| 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()) { |
|
Stephen White
2016/03/17 17:10:08
This is also done in filterInputGPU[Deprecated]().
robertphillips
2016/03/17 21:01:47
Right - filterInputGPU[Deprecated] should go away.
|
| + // Keep the result on the GPU - this is still required for some |
| + // image filters that don't support GPU in all cases |
|
Stephen White
2016/03/17 17:10:08
The only one I can think of off the top of my head
robertphillips
2016/03/17 21:01:47
I believe the SkXfermodeImageFilter balks at cropR
Stephen White
2016/03/17 21:30:17
I think you're misunderstanding what canFilterImag
|
| + GrContext* context = src->peekTexture()->getContext(); |
| + result.reset(result->makeTextureImage(src->internal_getProxy(), context)); |
| + } |
| + |
| + return result.release(); |
| } |
| #if SK_SUPPORT_GPU |