You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add video test to check copyExternalImageToTexture scaling issues #4576
I'm not sure how to describe this but I was trying to use video with WebGPU and ran into the issue that Chrome and Safari mis-scales video when using copyExternalImageToTexture with certain videos.
I didn't check if the same issue exists with importExternalTexture
It loads a 1920x1080 video. In WebGPU it sets the canvas size to the size of the video and the uses copyExternalImageToTexture to copy it directly into the canvas. In Chrome, in Windows the result is wrong size. In Safari on Mac the result is also the wrong size.
In WebGL it uses texImage2D to copy the video into a texture and then renders that texture to the canvs, This works on both browsers.
Safari, Mac
Chrome, Windows
Once we know what the issue is hopefully we can make a test for it
The chrome issue looks like a problem with the coded size (1920x1088) vs the display size (1920x1080). Dunno about the safari issue, might be unrelated
I'm pretty sure the actual issue is more 1088 vs 1080. Looking at the right red border it looks plausible it's 8px off. Looking at the size of the text it's not just 8px off
Activity
greggman commentedon Jan 27, 2026
https://issues.chromium.org/issues/477993291
https://bugs.webkit.org/show_bug.cgi?id=306100
kainino0x commentedon Jan 27, 2026
The chrome issue looks like a problem with the coded size (1920x1088) vs the display size (1920x1080). Dunno about the safari issue, might be unrelated
greggman commentedon Jan 27, 2026
I'm pretty sure the actual issue is more 1088 vs 1080. Looking at the right red border it looks plausible it's 8px off. Looking at the size of the text it's not just 8px off
kainino0x commentedon Jan 27, 2026
Oh I totally missed that. I saw the border was part of the video, I didn't realize the webpage ALSO had a 1px red border