Index: src/gpu/effects/GrConstColorProcessor.cpp |
diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp |
index bc09156a711027b30d0ce3d84c4321822df95647..e98a1ff33e8be4533e6ecb98b214fd9b4e218d54 100644 |
--- a/src/gpu/effects/GrConstColorProcessor.cpp |
+++ b/src/gpu/effects/GrConstColorProcessor.cpp |
@@ -13,26 +13,23 @@ class GLConstColorProcessor : public GrGLFragmentProcessor { |
public: |
GLConstColorProcessor() : fPrevColor(GrColor_ILLEGAL) {} |
- void emitCode(GrGLFPBuilder* builder, |
- const GrFragmentProcessor& fp, |
- const char* outputColor, |
- const char* inputColor, |
- const TransformedCoordsArray& coords, |
- const TextureSamplerArray& samplers) override { |
- GrGLFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); |
+ void emitCode(EmitArgs& args) override { |
+ GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder(); |
const char* colorUni; |
- fColorUniform = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
+ fColorUniform = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
kVec4f_GrSLType, kMedium_GrSLPrecision, "constantColor", |
&colorUni); |
- switch (fp.cast<GrConstColorProcessor>().inputMode()) { |
+ switch (args.fFp.cast<GrConstColorProcessor>().inputMode()) { |
case GrConstColorProcessor::kIgnore_InputMode: |
- fsBuilder->codeAppendf("%s = %s;", outputColor, colorUni); |
+ fsBuilder->codeAppendf("%s = %s;", args.fOutputColor, colorUni); |
break; |
case GrConstColorProcessor::kModulateRGBA_InputMode: |
- fsBuilder->codeAppendf("%s = %s * %s;", outputColor, inputColor, colorUni); |
+ fsBuilder->codeAppendf("%s = %s * %s;", args.fOutputColor, args.fInputColor, |
+ colorUni); |
break; |
case GrConstColorProcessor::kModulateA_InputMode: |
- fsBuilder->codeAppendf("%s = %s.a * %s;", outputColor, inputColor, colorUni); |
+ fsBuilder->codeAppendf("%s = %s.a * %s;", args.fOutputColor, args.fInputColor, |
+ colorUni); |
break; |
} |
} |