From 3da61af1dced938d5f6a318c59305d367a0f8b90 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Wed, 24 Nov 2021 20:50:56 -0800 Subject: [PATCH] Define importing VideoFrame into WebGPU --- index.src.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/index.src.html b/index.src.html index c16f2faa..3238808c 100644 --- a/index.src.html +++ b/index.src.html @@ -3772,6 +3772,26 @@ {{ImageBitmapOptions}} {{ImageBitmapOptions/colorSpaceConversion}}. Setting this value to "none" disables color space conversion. +### WebGPU ### {#videoframe-webgpu} + +[[WebGPU]] is extended to allow importing {{VideoFrame}} objects via +{{GPUDevice/importExternalTexture())}, producing opaque {{GPUExternalTexture}} +objects, which can be read from WebGPU shaders. +The definition of the {{GPUExternalTextureDescriptor/source}} member of +{{GPUExternalTextureDescriptor}} is modified to allow {{VideoFrame}}: + + +partial dictionary GPUExternalTextureDescriptor { + required (HTMLVideoElement or VideoFrame) source; +}; + + +The lifetime of such a {{GPUExternalTexture}} object is implicitly tied to the +lifetime of the source {{VideoFrame}} object. +When the {{VideoFrame}} is [=Close VideoFrame|closed=] (implicitly or +explicitly), the {{GPUExternalTexture}} is *destroyed*, so no further operations +using it can be issued. + VideoFrame CopyTo() Options {#videoframe-copyto-options} ------------------------------------------------------------ Options to specify a rectangle of pixels to copy and the offset and stride of