GPUCanvasContext

interface

interface GPUCanvasContext

The rendering context that presents WebGPU-rendered images on an OffscreenCanvas. Obtained from OffscreenCanvas.getContext with the "webgpu" context id.

variable

var GPUCanvasContext: { … }

The constructor object for GPUCanvasContext.

A GPUCanvasContext is obtained from OffscreenCanvas.getContext with the "webgpu" context id rather than constructed directly.

Properties

canvas

readonly canvas: OffscreenCanvas

The canvas that this context is bound to.

prototype

prototype: GPUCanvasContext

Methods

configure

configure(configuration: GPUCanvasConfiguration): undefined

getConfiguration

getConfiguration(): GPUCanvasConfiguration | null

unconfigure

unconfigure(): undefined

getCurrentTexture

getCurrentTexture(): GPUTexture