<!DOCTYPE html><linkrel="match"href="imageBitmapRendering-transferFromImageBitmap-webgl-expected.html"/><body><p> Test creating an ImageBitmap from the transferToImageBitmap of a webgl OffscreenCanvas, and then transferred to an ImageBitmapRenderingContext.</p><canvasid="canvas"width="300"height="300"></canvas></body><script>functiondrawSquares(ctx){ctx.enable(ctx.SCISSOR_TEST);ctx.scissor(0,150,150,150);ctx.clearColor(1,0,0,1);ctx.clear(ctx.COLOR_BUFFER_BIT);ctx.scissor(150,150,300,150);ctx.clearColor(0,1,0,1);ctx.clear(ctx.COLOR_BUFFER_BIT);ctx.scissor(0,0,150,150);ctx.clearColor(0,0,1,1);ctx.clear(ctx.COLOR_BUFFER_BIT);}asyncfunctionrunTest(){constoffscreen=newOffscreenCanvas(300,300);constctxOffscreen=offscreen.getContext('webgl');drawSquares(ctxOffscreen);constimage=offscreen.transferToImageBitmap();constcanvas=document.getElementById('canvas');constctx=canvas.getContext('bitmaprenderer');ctx.transferFromImageBitmap(image);}runTest();</script>