Index: src/effects/gradients/SkTwoPointConicalGradient.cpp |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
index 41b5c1bbae52e696aafd3099048ebb74f05bb034..daec1e6388c8df1280efb9ea664d6e701a2902af 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
@@ -359,31 +359,20 @@ void SkTwoPointConicalGradient::flatten(SkWriteBuffer& buffer) const { |
#if SK_SUPPORT_GPU |
#include "SkGr.h" |
- |
-bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context, |
- const SkPaint& paint, |
- const SkMatrix& viewM, |
- const SkMatrix* localMatrix, |
- GrColor* paintColor, |
- GrProcessorDataManager* procDataManager, |
- GrFragmentProcessor** fp) const { |
+#include "effects/GrExtractAlphaFragmentProcessor.h" |
+ |
+const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor( |
+ GrContext* context, |
+ const SkMatrix& viewM, |
+ const SkMatrix* localMatrix, |
+ SkFilterQuality, |
+ GrProcessorDataManager* procDataManager) const { |
SkASSERT(context); |
SkASSERT(fPtsToUnit.isIdentity()); |
- |
- *fp = Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTileMode, |
- localMatrix); |
- *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); |
- return true; |
-} |
- |
-#else |
- |
-bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&, |
- const SkMatrix&, const SkMatrix*, |
- GrColor*, GrProcessorDataManager*, |
- GrFragmentProcessor**) const { |
- SkDEBUGFAIL("Should not call in GPU-less build"); |
- return false; |
+ SkAutoTUnref<const GrFragmentProcessor> inner( |
+ Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTileMode, |
+ localMatrix)); |
+ return GrExtractAlphaFragmentProcessor::Create(inner); |
} |
#endif |