diff --git a/source b/source index 92fa4d6e423..cf487e9120d 100644 --- a/source +++ b/source @@ -3825,6 +3825,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute +
WebGPU
+ +
+

The following interfaces are defined in WebGPU:

+ + +
+ + +
WebVTT
@@ -60270,7 +60282,7 @@ dictionary AssignedNodesOptions {
For implementers.
DOM interface:
-
typedef (CanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext) RenderingContext;
+    
typedef (CanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) RenderingContext;
 
 [Exposed=Window]
 interface HTMLCanvasElement : HTMLElement {
@@ -60389,8 +60401,9 @@ callback BlobCallback = undefined (Blob? blob);
   data-x="concept-canvas-placeholder">placeholder, 2d, bitmaprenderer, webgl, or webgl2 by algorithms defined in this specification.

+ data-x="concept-canvas-webgl">webgl, webgl2, or webgpu by algorithms defined in this specification.

When its canvas context mode is none, a canvas element has no rendering context, @@ -60444,6 +60457,12 @@ callback BlobCallback = undefined (Blob? blob);

Follow the behavior defined in the WebGL specifications.

+ + +

webgpu

+ +

Follow the behavior defined in WebGPU.

+

bitmaprenderer

@@ -60481,13 +60500,15 @@ callback BlobCallback = undefined (Blob? blob);

Returns an object that exposes an API for drawing on the canvas. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.

+ data-x="canvas-context-webgl">webgl
", "webgl2", or "webgpu". options is handled by that API.

This specification defines the "2d" and "bitmaprenderer" contexts below. The WebGL specifications define the "webgl" and "webgl2" contexts.

+ data-x="canvas-context-webgl2">webgl2
" contexts. WebGPU defines the "webgpu" context.

Returns null if contextId is not supported, or if the canvas has already been initialized with another context type (e.g., trying to get a "BlobCallback = undefined (Blob? blob); bitmaprenderer webgl or webgl2 + webgpu placeholder @@ -60541,6 +60563,8 @@ callback BlobCallback = undefined (Blob? blob); Return null. Return null. + + Return null. Throw an "InvalidStateError" DOMException. @@ -60559,6 +60583,8 @@ callback BlobCallback = undefined (Blob? blob); first argument. Return null. + + Return null. Throw an "InvalidStateError" DOMException. @@ -60581,6 +60607,30 @@ callback BlobCallback = undefined (Blob? blob); Return the same object as was returned the last time the method was invoked with this same first argument. + + Return null. + + Throw an "InvalidStateError" DOMException. + + "webgpu", if the user + agent supports the WebGPU feature in its current configuration + + Follow the instructions given in WebGPU's Canvas Rendering section to + obtain a GPUCanvasContext or null; if the returned value is null, then return + null; otherwise, set this canvas element's context mode to webgpu and return the + GPUCanvasContext object. + + Return null. + + Return null. + + Return null. + + Return the same object as was returned the last time the method was invoked with this same + first argument. Throw an "InvalidStateError" DOMException. @@ -60593,6 +60643,8 @@ callback BlobCallback = undefined (Blob? blob); Return null. Return null. + + Return null. Throw an "InvalidStateError" DOMException. @@ -66422,14 +66474,14 @@ dictionary ImageBitmapRenderingContextSettings {

The OffscreenCanvas interface
-
typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext) OffscreenRenderingContext;
+  
typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) OffscreenRenderingContext;
 
 dictionary ImageEncodeOptions {
   DOMString type = "image/png";
   unrestricted double quality;
 };
 
-enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2" };
+enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2", "webgpu" };
 
 [Exposed=(Window,Worker), Transferable]
 interface OffscreenCanvas : EventTarget {
@@ -66482,15 +66534,18 @@ interface OffscreenCanvas : EventTarget {
     object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that
-    API.

+ data-x="offscreen-context-type-webgl">webgl
", "webgl2", or "webgpu". options is handled by + that API.

This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts.

+ data-x="offscreen-context-type-webgl2">webgl2
" contexts. WebGPU defines the + "webgpu" context.

Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a @@ -66515,7 +66570,8 @@ interface OffscreenCanvas : EventTarget { data-x="offscreencanvas-context-2d">2d, bitmaprenderer, webgl, webgl2, or webgl2, webgpu, or detached by algorithms defined in this specification.

@@ -66597,6 +66653,7 @@ interface OffscreenCanvas : EventTarget { bitmaprenderer webgl or webgl2 + webgpu detached @@ -66617,6 +66674,8 @@ interface OffscreenCanvas : EventTarget { Return null. Return null. + + Return null. Throw an "InvalidStateError" DOMException. @@ -66637,6 +66696,8 @@ interface OffscreenCanvas : EventTarget { first argument. Return null. + + Return null. Throw an "InvalidStateError" DOMException. @@ -66658,6 +66719,29 @@ interface OffscreenCanvas : EventTarget { Return the same value as was returned the last time the method was invoked with this same first argument. + + Return null. + + Throw an "InvalidStateError" DOMException. + + "webgpu" + + Follow the instructions given in WebGPU's Canvas Rendering section to + obtain a GPUCanvasContext or null; if the returned value is null, then return + null; otherwise, set this OffscreenCanvas object's context mode to webgpu and return the + GPUCanvasContext object. + + Return null. + + Return null. + + Return null. + + Return the same value as was returned the last time the method was invoked with this same + first argument. Throw an "InvalidStateError" DOMException. @@ -66702,6 +66786,9 @@ interface OffscreenCanvas : EventTarget { data-x="offscreen-context-type-webgl2">webgl2
" contexts is defined in the WebGL specifications.

+

The resizing behavior for "webgpu" + context is defined in WebGPU.

+

If an OffscreenCanvas object whose dimensions were changed has @@ -125604,6 +125691,9 @@ INSERT INTERFACES HERE

[WEBGL]
WebGL Specifications, D. Jackson, J. Gilbert. Khronos Group.
+
[WEBGPU]
+
WebGPU, D. Malyshau, K. Ninomiya. W3C.
+
[WEBIDL]
Web IDL, C. McCormack. W3C.