xref: /aosp_15_r20/external/skia/resources/sksl/runtime/IncrementDisambiguation.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 colorRed;
2
3float4 main(float2 xy) {
4    half4 c = colorRed;
5
6    // The minifier should preserve spaces between increment operators and addition/subtraction.
7    // If spaces are removed, the second line could parse as `c.a-- - c.r` and evaluate to zero.
8    c.g = c.a++ + c.b;  // c = {1, 1, 0, 2}
9    c.g = c.a - --c.r;  // c = {0, 2, 0, 2}
10
11    return saturate(c);
12}
13