diff --git a/index.src.html b/index.src.html index c16f2faa..8b6826bf 100644 --- a/index.src.html +++ b/index.src.html @@ -101,6 +101,14 @@ spec: visibility-state; urlPrefix: https://www.w3.org/TR/page-visibility/# type: enum-value; text: hidden; url: dom-visibilitystate-hidden + +spec: webgpu; urlPrefix: https://www.w3.org/TR/webgpu/# + type: interface; text: GPUExternalTexture; url: gpuexternaltexture + type: dictionary; text: GPUExternalTextureDescriptor; url: dictdef-gpuexternaltexturedescriptor + for: GPUExternalTextureDescriptor; + type: dict-member; text: source; url: dom-gpuexternaltexturedescriptor-source + for: GPUDevice; + type: method; text: importExternalTexture(); url: dom-gpudevice-importexternaltexture
@@ -3772,6 +3780,28 @@ {{ImageBitmapOptions}} {{ImageBitmapOptions/colorSpaceConversion}}. Setting this value to "none" disables color space conversion. +### WebGPU ### {#videoframe-webgpu} + +WebCodecs extends [[WebGPU]] 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=] +(e.g. via {{VideoFrame/close()}} or +[[#videoframe-transfer-serialization|transferring the VideoFrame]]), +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