Bug 1796551 [wpt PR 36570] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=246798, a=testonly

Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=246798 (#36570)

--

wpt-commits: 73da362e9a60d776c084d8c5a28a2b4c56eb5fd9
wpt-pr: 36570
This commit is contained in:
youennf
2022-10-26 19:55:38 +00:00
committed by moz-wptsync-bot
parent 9fa2512945
commit 6ebc44c41f

View File

@@ -30,8 +30,14 @@ function testTexImage2DFromVideoFrame(
argbData.fill(0xFF966432); // 'rgb(50, 100, 150)';
let frame = new VideoFrame(argbData, vfInit);
let gl_canvas = new OffscreenCanvas(width, height);
let gl = gl_canvas.getContext('webgl');
let canvas;
if (self.HTMLCanvasElement) {
canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
} else
canvas = new OffscreenCanvas(width, height);
let gl = canvas.getContext('webgl');
let program = WebGLTestUtils.setupTexturedQuad(gl);
gl.clearColor(0, 0, 0, 1);
@@ -91,8 +97,14 @@ function testTexImageWithClosedVideoFrame(useTexSubImage2D) {
argbData.fill(0xFF966432); // 'rgb(50, 100, 150)';
let frame = new VideoFrame(argbData, vfInit);
let gl_canvas = new OffscreenCanvas(width, height);
let gl = gl_canvas.getContext('webgl');
let canvas;
if (self.HTMLCanvasElement) {
canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
} else
canvas = new OffscreenCanvas(width, height);
let gl = canvas.getContext('webgl');
frame.close();
if (useTexSubImage2D) {