798021ada3
Change-Id: I8309940f8e40d0e84847ae272830896d010c39de Bug: skia:11219 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359138 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
20 lines
416 B
Plaintext
20 lines
416 B
Plaintext
half4 main() {
|
|
half4 x = half4(1, 1, 1, 1);
|
|
|
|
// Verify that break is allowed in a do-while loop.
|
|
do {
|
|
x.r -= 0.25;
|
|
if (x.r <= 0) break;
|
|
} while (x.a == 1);
|
|
|
|
// Verify that continue is allowed in a do-while loop.
|
|
do {
|
|
x.b -= 0.25;
|
|
if (x.a == 1) continue; // should always happen
|
|
x.g = 0;
|
|
} while (x.b > 0);
|
|
|
|
// x contains green.
|
|
return x;
|
|
}
|