4 <title>Reference for Bug
1972885</title>
13 /* Subpixel snapped down. */
17 <canvas id=
"canvas"></canvas>
19 function draw(canvas
, width
, height
) {
20 const ctx
= canvas
.getContext('2d');
22 canvas
.height
= height
;
23 const imgData
= ctx
.createImageData(width
, height
);
24 const u32View
= new Uint32Array(imgData
.data
.buffer
);
25 u32View
.fill(0xFFFFFFFF);
26 for (let y
= 0; y
< height
; y
+= 2) {
27 for (let x
= 0; x
< width
; x
++) {
28 u32View
[y
* width
+ x
] = 0xFF000000;
31 ctx
.putImageData(imgData
, 0, 0);
34 draw(canvas
, 100, 100);