Index: gm/dcshader.cpp |
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp |
index 28c811de222bfa285e41dcc3dea62a52fd056d47..3eee43d1474cb058c336bdf770550cd870049cc7 100644 |
--- a/gm/dcshader.cpp |
+++ b/gm/dcshader.cpp |
@@ -10,7 +10,6 @@ |
#if SK_SUPPORT_GPU |
#include "GrFragmentProcessor.h" |
#include "GrCoordTransform.h" |
-#include "effects/GrExtractAlphaFragmentProcessor.h" |
#include "gl/GrGLProcessor.h" |
#include "gl/builders/GrGLProgramBuilder.h" |
#include "Resources.h" |
@@ -34,8 +33,9 @@ |
buf.writeMatrix(fDeviceMatrix); |
} |
- const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewM, |
- const SkMatrix* localMatrix, SkFilterQuality, GrProcessorDataManager*) const override; |
+ bool asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix& viewM, |
+ const SkMatrix* localMatrix, GrColor* color, GrProcessorDataManager*, |
+ GrFragmentProcessor** fp) const override; |
#ifndef SK_IGNORE_TO_STRING |
void toString(SkString* str) const override { |
@@ -94,10 +94,13 @@ |
GrCoordTransform fDeviceTransform; |
}; |
-const GrFragmentProcessor* DCShader::asFragmentProcessor(GrContext*, const SkMatrix& viewM, |
- const SkMatrix* localMatrix, SkFilterQuality, GrProcessorDataManager* procDataManager) const { |
- SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(procDataManager, fDeviceMatrix)); |
- return GrExtractAlphaFragmentProcessor::Create(inner); |
+bool DCShader::asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix& viewM, |
+ const SkMatrix* localMatrix, GrColor* color, |
+ GrProcessorDataManager* procDataManager, |
+ GrFragmentProcessor** fp) const { |
+ *fp = new DCFP(procDataManager, fDeviceMatrix); |
+ *color = GrColorPackA4(paint.getAlpha()); |
+ return true; |
} |
class DCShaderGM : public GM { |