aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkColorFilter.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-06-09 08:01:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-09 08:01:03 -0700
commit06ca8ec87cf6fab57cadd043a5ac18c4154a4129 (patch)
tree95e7eaaaf3f42ce550332277c431e3ec119446f4 /include/core/SkColorFilter.h
parent897a8e38879643d81a64d2bb6bed4e22af982aa4 (diff)
sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and GrXPFactory to sk_sp. This clarifies ownership and should reduce reference count churn by moving ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004 Review-Url: https://codereview.chromium.org/2041113004
Diffstat (limited to 'include/core/SkColorFilter.h')
-rw-r--r--include/core/SkColorFilter.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 7ac335fb10..7b2ee7845e 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;