From 1b9f0cb452e672c187233de23cd74c7f8a3f773b Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 22 Jan 2024 02:21:45 +0530 Subject: chore: add types for `Deno.UnsafeWindowSurface` (#22010) --- cli/tsc/dts/lib.deno_webgpu.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'cli/tsc/dts/lib.deno_webgpu.d.ts') diff --git a/cli/tsc/dts/lib.deno_webgpu.d.ts b/cli/tsc/dts/lib.deno_webgpu.d.ts index f83ea5aa5..606c77634 100644 --- a/cli/tsc/dts/lib.deno_webgpu.d.ts +++ b/cli/tsc/dts/lib.deno_webgpu.d.ts @@ -1313,3 +1313,22 @@ declare interface GPUExtent3DDict { /** @category WebGPU */ declare type GPUExtent3D = number[] | GPUExtent3DDict; + +/** @category WebGPU */ +declare type GPUCanvasAlphaMode = "opaque" | "premultiplied"; + +/** @category WebGPU */ +declare interface GPUCanvasConfiguration { + device: GPUDevice; + format: GPUTextureFormat; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; + colorSpace?: "srgb" | "display-p3"; + alphaMode?: GPUCanvasAlphaMode; +} +/** @category WebGPU */ +declare interface GPUCanvasContext { + configure(configuration: GPUCanvasConfiguration): undefined; + unconfigure(): undefined; + getCurrentTexture(): GPUTexture; +} -- cgit v1.2.3