Index: src/effects/SkLumaColorFilter.cpp |
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp |
index 99399092b3c41de170f777a861f93dc23ee504c3..34cfdad102b25e3f4edcaf9d3d4f6427aa2f52c5 100644 |
--- a/src/effects/SkLumaColorFilter.cpp |
+++ b/src/effects/SkLumaColorFilter.cpp |
@@ -80,24 +80,19 @@ public: |
static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b) {} |
- virtual void emitCode(GrGLFPBuilder* builder, |
- const GrFragmentProcessor&, |
- const char* outputColor, |
- const char* inputColor, |
- const TransformedCoordsArray&, |
- const TextureSamplerArray&) override { |
- if (NULL == inputColor) { |
- inputColor = "vec4(1)"; |
+ virtual void emitCode(EmitArgs& args) override { |
+ if (NULL == args.fInputColor) { |
+ args.fInputColor = "vec4(1)"; |
} |
- GrGLFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); |
+ GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder(); |
fsBuilder->codeAppendf("\tfloat luma = dot(vec3(%f, %f, %f), %s.rgb);\n", |
SK_ITU_BT709_LUM_COEFF_R, |
SK_ITU_BT709_LUM_COEFF_G, |
SK_ITU_BT709_LUM_COEFF_B, |
- inputColor); |
+ args.fInputColor); |
fsBuilder->codeAppendf("\t%s = vec4(0, 0, 0, luma);\n", |
- outputColor); |
+ args.fOutputColor); |
} |