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

Unified Diff: include/core/SkColorFilter.h

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | include/core/SkRefCnt.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColorFilter.h
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 7ac335fb103677fb50037915e67b99b9dbbcf177..7b2ee7845e1099c0cb549a1d58a88aa2becac973 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -10,6 +10,7 @@
#include "SkColor.h"
#include "SkFlattenable.h"
+#include "SkRefCnt.h"
#include "SkXfermode.h"
class GrContext;
@@ -142,6 +143,7 @@ public:
}
#endif
+#if SK_SUPPORT_GPU
/**
* A subclass may implement this factory function to work with the GPU backend. It returns
* a GrFragmentProcessor that implemets the color filter in GPU shader code.
@@ -151,9 +153,8 @@ public:
*
* A null return indicates that the color filter isn't implemented for the GPU backend.
*/
- virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*) const {
- return nullptr;
- }
+ virtual sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*) const;
+#endif
bool affectsTransparentBlack() const {
return this->filterColor(0) != 0;
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | include/core/SkRefCnt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698