74ebd7e6ce
Because we use `continue` for flow control handling now, we can escape from the middle of a switch statement. This wasn't possible when we used `break`. This unlocks some pretty stellar optimization opportunities if the switch value can be determined at compile time; see BlendEnum for an example. Change-Id: Id29be92c343c10fd604683a80c5d5bd2bd070cb0 Bug: skia:11097 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345419 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
19 lines
285 B
GLSL
19 lines
285 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
in vec4 src;
|
|
in vec4 dst;
|
|
void main() {
|
|
vec4 _0_blend;
|
|
for (int _1_loop = 0;_1_loop < 1; _1_loop++) {
|
|
{
|
|
{
|
|
_0_blend = src * dst;
|
|
continue;
|
|
}
|
|
|
|
}
|
|
}
|
|
sk_FragColor = _0_blend;
|
|
|
|
}
|