Revert "Revert "Revert "eliminated GrGLSLExpr"""
This reverts commit 796001c82eca5651bc6a221204f6186918781daf.
Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html)
Original change's description:
> Revert "Revert "eliminated GrGLSLExpr""
>
> This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c.
>
> Bug: skia:
> Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
> Reviewed-on: https://skia-review.googlesource.com/15187
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>
TBR=ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c
Reviewed-on: https://skia-review.googlesource.com/15309
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index f1cf195..276eaac 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1434,7 +1434,8 @@
if (ge.fColorSpaceXform) {
fragBuilder->codeAppend("colorTemp.rgb = clamp(colorTemp.rgb, 0, colorTemp.a);");
}
- fragBuilder->codeAppendf("%s = %s * colorTemp;", outputColor, inputColor);
+ fragBuilder->codeAppendf("%s = %s;", outputColor,
+ (GrGLSLExpr4(inputColor) * GrGLSLExpr4("colorTemp")).c_str());
break;
}
@@ -1472,7 +1473,8 @@
if (ge.fColorSpaceXform) {
fragBuilder->codeAppend("colorTemp.rgb = clamp(colorTemp.rgb, 0, colorTemp.a);");
}
- fragBuilder->codeAppendf("%s = %s * colorTemp;", outputColor, inputColor);
+ fragBuilder->codeAppendf("%s = %s;", outputColor,
+ (GrGLSLExpr4(inputColor) * GrGLSLExpr4("colorTemp")).c_str());
break;
}
@@ -1510,7 +1512,8 @@
if (ge.fColorSpaceXform) {
fragBuilder->codeAppend("colorTemp.rgb = clamp(colorTemp.rgb, 0, colorTemp.a);");
}
- fragBuilder->codeAppendf("%s = %s * colorTemp;", outputColor, inputColor);
+ fragBuilder->codeAppendf("%s = %s;", outputColor,
+ (GrGLSLExpr4(inputColor) * GrGLSLExpr4("colorTemp")).c_str());
break;
}
@@ -1536,7 +1539,8 @@
fragBuilder->codeAppend("colorTemp.rgb = clamp(colorTemp.rgb, 0, colorTemp.a);");
}
- fragBuilder->codeAppendf("%s = %s * colorTemp;", outputColor, inputColor);
+ fragBuilder->codeAppendf("%s = %s;", outputColor,
+ (GrGLSLExpr4(inputColor) * GrGLSLExpr4("colorTemp")).c_str());
break;
}
@@ -1567,7 +1571,8 @@
fragBuilder->codeAppend("colorTemp.rgb = clamp(colorTemp.rgb, 0, colorTemp.a);");
}
- fragBuilder->codeAppendf("%s = %s * colorTemp;", outputColor, inputColor);
+ fragBuilder->codeAppendf("%s = %s;", outputColor,
+ (GrGLSLExpr4(inputColor) * GrGLSLExpr4("colorTemp")).c_str());
break;
}