Re-land of "eliminated GrGLSLExpr".


This change is exactly the same as the last time it was landed; I believe the
underlying optimizer bug that was causing this to cause problems has been
fixed by a prior CL.
Bug: skia:
Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa
Reviewed-on: https://skia-review.googlesource.com/15768
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index de7b326..542cee6 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -101,9 +101,17 @@
     if (colorXformHelper && colorXformHelper->isValid()) {
         SkString xform;
         this->appendColorGamutXform(&xform, lookup.c_str(), colorXformHelper);
-        this->codeAppend((GrGLSLExpr4(modulation) * GrGLSLExpr4(xform)).c_str());
+        if (modulation) {
+            this->codeAppendf("%s * %s", modulation, xform.c_str());
+        } else {
+            this->codeAppendf("%s", xform.c_str());
+        }
     } else {
-        this->codeAppend((GrGLSLExpr4(modulation) * GrGLSLExpr4(lookup)).c_str());
+        if (modulation) {
+            this->codeAppendf("%s * %s", modulation, lookup.c_str());
+        } else {
+            this->codeAppendf("%s", lookup.c_str());
+        }
     }
 }