Index: src/gpu/gl/GrGLSL.cpp |
diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp |
index 0f740d92904ea420d26494592f3299f31cc55fd5..dce44f3aff6c389425f0c898aee483e0f0281e57 100644 |
--- a/src/gpu/gl/GrGLSL.cpp |
+++ b/src/gpu/gl/GrGLSL.cpp |
@@ -86,6 +86,7 @@ void GrGLSLMulVarBy4f(SkString* outAppend, |
if (mulFactor.isZeros()) { |
outAppend->appendf("%s = vec4(0);\n", vec4VarName); |
+ } else { |
+ outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str()); |
} |
- outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str()); |
} |