blob: 68b49ac92ccb91311c45fc20e69987b947ccbb04 [file] [log] [blame]
Ben Clayton55aa8012023-01-07 23:10:08 +00001<!DOCTYPE html>
Austin Eng1ab815d2022-06-10 22:00:33 +00002<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>