From 2d22364006df9f2ac5571932a1c8364476872e42 Mon Sep 17 00:00:00 2001 From: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com> Date: Thu, 26 Feb 2026 17:52:23 +0100 Subject: [PATCH] Update expected result of an unconfigured canvas to be transparent black --- .../web_platform/canvas/readbackFromWebGPUCanvas.spec.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/webgpu/web_platform/canvas/readbackFromWebGPUCanvas.spec.ts b/src/webgpu/web_platform/canvas/readbackFromWebGPUCanvas.spec.ts index ec434cc57854..0bd05d44c634 100644 --- a/src/webgpu/web_platform/canvas/readbackFromWebGPUCanvas.spec.ts +++ b/src/webgpu/web_platform/canvas/readbackFromWebGPUCanvas.spec.ts @@ -519,14 +519,8 @@ g.test('transferToImageBitmap_unconfigured_nonzero_size') return; } - // Since there isn't a configuration we expect the ImageBitmap to have the default alphaMode of "opaque". + // Since there isn't a configuration we expect the ImageBitmap to be transparent black. const expected = new Uint8ClampedArray(kWidth * kHeight * 4); - for (let i = 0; i < expected.byteLength; i += 4) { - expected[i + 0] = 0; - expected[i + 1] = 0; - expected[i + 2] = 0; - expected[i + 3] = 255; - } readbackContext.drawImage(ib, 0, 0); readPixelsFrom2DCanvasAndCompare(t, readbackContext, expected);