web api instance method
GPUCanvasContext: unconfigure() method
Secure contextAvailable in workers
The unconfigure() method of the
GPUCanvasContext interface removes any previously-set context configuration, and destroys any textures returned via getCurrentTexture() while the canvas context was configured.
Syntax
unconfigure()
Parameters
None.
Return value
None (undefined).
Examples
const canvas = document.querySelector("#gpuCanvas");
const context = canvas.getContext("webgpu");
context.configure({
device,
format: navigator.gpu.getPreferredCanvasFormat(),
alphaMode: "premultiplied",
});
// Later on
context.unconfigure();
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
- The WebGPU API