Index: src/effects/SkLumaColorFilter.cpp |
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp |
index 7e16f3ac89b6ce3abb3575821d73d4a495b01ccc..8c89ab054454a1094297fe5970ec98aba948be05 100644 |
--- a/src/effects/SkLumaColorFilter.cpp |
+++ b/src/effects/SkLumaColorFilter.cpp |
@@ -54,7 +54,7 @@ void SkLumaColorFilter::toString(SkString* str) const { |
#if SK_SUPPORT_GPU |
class LumaColorFilterEffect : public GrFragmentProcessor { |
public: |
- static GrFragmentProcessor* Create() { |
+ static const GrFragmentProcessor* Create() { |
static LumaColorFilterEffect gLumaEffect; |
return SkRef(&gLumaEffect); |
} |
@@ -108,19 +108,9 @@ private: |
} |
}; |
-bool SkLumaColorFilter::asFragmentProcessors(GrContext*, GrProcessorDataManager*, |
- SkTDArray<const GrFragmentProcessor*>* array) const { |
+const GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*, |
+ GrProcessorDataManager*) const { |
- GrFragmentProcessor* frag = LumaColorFilterEffect::Create(); |
- if (frag) { |
- if (array) { |
- *array->append() = frag; |
- } else { |
- frag->unref(); |
- SkDEBUGCODE(frag = nullptr;) |
- } |
- return true; |
- } |
- return false; |
+ return LumaColorFilterEffect::Create(); |
} |
#endif |