From 621c1b8f611d0a09e5dab6e83494fd090dae21a5 Mon Sep 17 00:00:00 2001 From: Kenneth Russell Date: Sat, 4 May 2024 14:52:51 -0700 Subject: [PATCH] Fix image-decoder-to-texture in WebGL 2 mode. The test was fetching nonexistent "width" and "height" properties on the VideoFrame, leading to a (0, 0)-sized texture upload. codedWidth and codedHeight are the best approximation without handling the full visibleRect in the test. Follow-on to #3641 . Associated with Chromium bug crbug.com/337904214 . --- .../conformance/textures/misc/image-decoder-to-texture.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/tests/conformance/textures/misc/image-decoder-to-texture.html b/sdk/tests/conformance/textures/misc/image-decoder-to-texture.html index 18debd09d..2c65ca839 100644 --- a/sdk/tests/conformance/textures/misc/image-decoder-to-texture.html +++ b/sdk/tests/conformance/textures/misc/image-decoder-to-texture.html @@ -59,7 +59,7 @@ } let frame = decodeResult.image; if (window.WebGL2RenderingContext && gl instanceof window.WebGL2RenderingContext) { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, frame.width, frame.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, frame); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, frame.codedWidth, frame.codedHeight, 0, gl.RGBA, gl.UNSIGNED_BYTE, frame); } else { gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, frame); }