aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLShaderBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl/GrGLSLShaderBuilder.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLShaderBuilder.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 1a681b56a3..2c7e5e476d 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -101,17 +101,9 @@ void GrGLSLShaderBuilder::appendTextureLookupAndModulate(
if (colorXformHelper && colorXformHelper->isValid()) {
SkString xform;
this->appendColorGamutXform(&xform, lookup.c_str(), colorXformHelper);
- if (modulation) {
- this->codeAppendf("%s * %s", modulation, xform.c_str());
- } else {
- this->codeAppendf("%s", xform.c_str());
- }
+ this->codeAppend((GrGLSLExpr4(modulation) * GrGLSLExpr4(xform)).c_str());
} else {
- if (modulation) {
- this->codeAppendf("%s * %s", modulation, lookup.c_str());
- } else {
- this->codeAppendf("%s", lookup.c_str());
- }
+ this->codeAppend((GrGLSLExpr4(modulation) * GrGLSLExpr4(lookup)).c_str());
}
}