Index: src/effects/gradients/SkTwoPointConicalGradient.cpp |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
index d1fa7b005da319e55c8ee93bfdd46ce6eeca9df5..41b5c1bbae52e696aafd3099048ebb74f05bb034 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
@@ -359,17 +359,31 @@ |
#if SK_SUPPORT_GPU |
#include "SkGr.h" |
-#include "effects/GrExtractAlphaFragmentProcessor.h" |
- |
-const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context, |
- const SkMatrix& viewM, const SkMatrix* localMatrix, SkFilterQuality, |
- GrProcessorDataManager* procDataManager) const { |
+ |
+bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context, |
+ const SkPaint& paint, |
+ const SkMatrix& viewM, |
+ const SkMatrix* localMatrix, |
+ GrColor* paintColor, |
+ GrProcessorDataManager* procDataManager, |
+ GrFragmentProcessor** fp) const { |
SkASSERT(context); |
SkASSERT(fPtsToUnit.isIdentity()); |
- SkAutoTUnref<const GrFragmentProcessor> inner( |
- Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTileMode, |
- localMatrix)); |
- return GrExtractAlphaFragmentProcessor::Create(inner); |
+ |
+ *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; |
} |
#endif |