Index: src/core/SkColorFilter.cpp |
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp |
index 4605a1d7ab8231c068d4fe48072b9ff81de4132c..25e6b2ea7389e7392823ca54cc034e30853cb46d 100644 |
--- a/src/core/SkColorFilter.cpp |
+++ b/src/core/SkColorFilter.cpp |
@@ -13,7 +13,9 @@ |
#include "SkUnPreMultiply.h" |
#include "SkWriteBuffer.h" |
-class GrFragmentProcessor; |
+#if SK_SUPPORT_GPU |
+#include "GrFragmentProcessor.h" |
+#endif |
bool SkColorFilter::asColorMode(SkColor* color, SkXfermode::Mode* mode) const { |
return false; |
@@ -67,11 +69,15 @@ public: |
#endif |
#if SK_SUPPORT_GPU |
- bool asFragmentProcessors(GrContext* context, GrProcessorDataManager* procDataManager, |
- SkTDArray<const GrFragmentProcessor*>* array) const override { |
- bool hasFrags = fInner->asFragmentProcessors(context, procDataManager, array); |
- hasFrags |= fOuter->asFragmentProcessors(context, procDataManager, array); |
- return hasFrags; |
+ const GrFragmentProcessor* asFragmentProcessor(GrContext* context, |
+ GrProcessorDataManager* pdm) const override { |
+ SkAutoTUnref<const GrFragmentProcessor> innerFP(fInner->asFragmentProcessor(context, pdm)); |
+ SkAutoTUnref<const GrFragmentProcessor> outerFP(fOuter->asFragmentProcessor(context, pdm)); |
+ if (!innerFP || !outerFP) { |
+ return nullptr; |
+ } |
+ const GrFragmentProcessor* series[] = { innerFP, outerFP }; |
+ return GrFragmentProcessor::RunInSeries(series, 2); |
} |
#endif |