| Ben Clayton | 55aa801 | 2023-01-07 23:10:08 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| Austin Eng | 1ab815d | 2022-06-10 22:00:33 +0000 | [diff] [blame] | 2 | <html> |
| 3 | <base ref="/gen/third_party/dawn/webgpu-cts/src/webgpu" /> |
| 4 | <title>WebGPU canvas_clear (ref)</title> |
| 5 | <meta charset="utf-8" /> |
| 6 | <link rel="help" href="https://gpuweb.github.io/gpuweb/" /> |
| 7 | <canvas id="cvs0" width="20" height="20" style="width: 20px; height: 20px;"></canvas> |
| 8 | <canvas id="cvs1" width="20" height="20" style="width: 20px; height: 20px;"></canvas> |
| 9 | <canvas id="cvs2" width="20" height="20" style="width: 20px; height: 20px;"></canvas> |
| 10 | <script> |
| 11 | function draw(canvas) { |
| 12 | var c = document.getElementById(canvas); |
| 13 | var ctx = c.getContext('2d'); |
| 14 | ctx.fillStyle = '#66FF00'; |
| 15 | ctx.fillRect(0, 0, c.width, c.height); |
| 16 | } |
| 17 | |
| 18 | draw('cvs0'); |
| 19 | draw('cvs1'); |
| 20 | draw('cvs2'); |
| 21 | |
| 22 | </script> |
| 23 | </html> |