aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/effects/SkBlendImageFilter.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp
index 3c625bb0b4..74ec7e31a0 100644
--- a/src/effects/SkBlendImageFilter.cpp
+++ b/src/effects/SkBlendImageFilter.cpp
@@ -277,20 +277,23 @@ void GrGLBlendEffect::emitCode(GrGLShaderBuilder* builder,
const char* outputColor,
const char* inputColor,
const TextureSamplerArray& samplers) {
- const char* coords;
- GrSLType fgCoordsType = fForegroundEffectMatrix.emitCode(builder, key, vertexCoords, &coords, NULL, "FG");
- GrSLType bgCoordsType = fBackgroundEffectMatrix.emitCode(builder, key, vertexCoords, &coords, NULL, "BG");
+ const char* fgCoords;
+ const char* bgCoords;
+ GrSLType fgCoordsType = fForegroundEffectMatrix.emitCode(
+ builder, key, vertexCoords, &fgCoords, NULL, "FG");
+ GrSLType bgCoordsType = fBackgroundEffectMatrix.emitCode(
+ builder, key, vertexCoords, &bgCoords, NULL, "BG");
SkString* code = &builder->fFSCode;
const char* bgColor = "bgColor";
const char* fgColor = "fgColor";
code->appendf("\t\tvec4 %s = ", fgColor);
- builder->appendTextureLookup(code, samplers[0], coords, fgCoordsType);
+ builder->appendTextureLookup(code, samplers[0], fgCoords, fgCoordsType);
code->append(";\n");
code->appendf("\t\tvec4 %s = ", bgColor);
- builder->appendTextureLookup(code, samplers[1], coords, bgCoordsType);
+ builder->appendTextureLookup(code, samplers[1], bgCoords, bgCoordsType);
code->append(";\n");
code->appendf("\t\t%s.a = 1.0 - (1.0 - %s.a) * (1.0 - %s.b);\n", outputColor, bgColor, fgColor);