Skip to content

Commit 54441b8

Browse files
authored
Update expected result of an unconfigured canvas to be transparent black (#4607)
1 parent d213d4b commit 54441b8

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/webgpu/web_platform/canvas/readbackFromWebGPUCanvas.spec.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,8 @@ g.test('transferToImageBitmap_unconfigured_nonzero_size')
519519
return;
520520
}
521521

522-
// Since there isn't a configuration we expect the ImageBitmap to have the default alphaMode of "opaque".
522+
// Since there isn't a configuration we expect the ImageBitmap to be transparent black.
523523
const expected = new Uint8ClampedArray(kWidth * kHeight * 4);
524-
for (let i = 0; i < expected.byteLength; i += 4) {
525-
expected[i + 0] = 0;
526-
expected[i + 1] = 0;
527-
expected[i + 2] = 0;
528-
expected[i + 3] = 255;
529-
}
530524

531525
readbackContext.drawImage(ib, 0, 0);
532526
readPixelsFrom2DCanvasAndCompare(t, readbackContext, expected);

0 commit comments

Comments
 (0)