aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkGradientShader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/gradients/SkGradientShader.cpp')
-rw-r--r--src/effects/gradients/SkGradientShader.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 3d989b7611..891b1cdf9b 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -699,19 +699,14 @@ void GrGLGradientStage::setData(const GrGLUniformManager& uman,
}
void GrGLGradientStage::emitColorLookup(GrGLShaderBuilder* builder,
- const char* gradientTValue,
+ const char* tName,
const char* outputColor,
- const char* inputColor,
const char* samplerName) {
- SkString* code = &builder->fFSCode;
- code->appendf("\tvec2 coord = vec2(%s, %s);\n",
- gradientTValue,
- builder->getUniformVariable(fFSYUni).c_str());
- GrGLSLMulVarBy4f(code, 1, outputColor, inputColor);
- code->appendf("\t%s = ", outputColor);
- builder->appendTextureLookupAndModulate(code, inputColor, samplerName, "coord");
- code->append(";\n");
+ builder->fFSCode.appendf("\tvec2 coord = vec2(%s, %s);\n",
+ tName,
+ builder->getUniformVariable(fFSYUni).c_str());
+ builder->emitTextureLookupAndModulate(outputColor, samplerName, "coord");
}
/////////////////////////////////////////////////////////////////////