4633c9149b
Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit7e685f0377
. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commite4da7b672f
. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
11 lines
170 B
GLSL
11 lines
170 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
uniform vec4 color;
|
|
void main() {
|
|
vec4 c = color;
|
|
if (c.x >= 0.5) ; else {
|
|
c = color + vec4(0.125);
|
|
}
|
|
sk_FragColor = c;
|
|
}
|