Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: src/core/SkImageFilter.cpp

Issue 1785643003: Switch SkBlurImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT (again) Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698