aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkLightingImageFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkLightingImageFilter.cpp')
-rw-r--r--src/effects/SkLightingImageFilter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 8eb28bb3c5..408e7021ff 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -1160,7 +1160,7 @@ void GrGLLightingEffect::emitFS(GrGLShaderBuilder* builder,
SkString texCoords;
texCoords.appendf("coord + vec2(%d, %d) * %s", dx, dy, imgInc);
code->appendf("\t\tm[%d] = ", index++);
- builder->appendTextureLookup(code, samplerName, texCoords.c_str());
+ builder->emitTextureLookup(samplerName, texCoords.c_str());
code->appendf(".a;\n");
}
}
@@ -1168,12 +1168,11 @@ void GrGLLightingEffect::emitFS(GrGLShaderBuilder* builder,
SkString arg;
arg.appendf("%s * m[4]", surfScale);
fLight->emitSurfaceToLight(builder, code, arg.c_str());
- code->append(";\n");
+ code->appendf(";\n");
code->appendf("\t\t%s = %s(%s(m, %s), surfaceToLight, ",
outputColor, lightFunc.c_str(), interiorNormalName.c_str(), surfScale);
fLight->emitLightColor(builder, "surfaceToLight");
- code->append(");\n");
- GrGLSLMulVarBy4f(code, 2, outputColor, inputColor);
+ code->appendf(")%s;\n", builder->fModulate.c_str());
}
GrGLProgramStage::StageKey GrGLLightingEffect::GenKey(const GrCustomStage& s,