SKGraphiteDawnBackendContext Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Supplies the Dawn (WebGPU) instance, device, and queue used to create a Dawn-backed SKGraphiteContext.
public class SKGraphiteDawnBackendContext : IDisposable
- Inheritance
-
SKGraphiteDawnBackendContext
- Implements
Remarks
Populate the WgpuInstance, WgpuDevice, and WgpuQueue handles, then pass this object to CreateDawn(SKGraphiteDawnBackendContext). You can dispose it as soon as the context has been created.
On non-yielding environments such as the browser (WASM), the Dawn event loop cannot be pumped from inside a managed call frame, so synchronous submits are rejected; drive readbacks with CheckAsyncWorkCompletion() instead.
Constructors
| Name | Description |
|---|---|
| SKGraphiteDawnBackendContext() |
Initializes a new instance of the SKGraphiteDawnBackendContext class. |
Properties
| Name | Description |
|---|---|
| WgpuDevice |
Gets or sets the handle to the WebGPU device. |
| WgpuInstance |
Gets or sets the handle to the WebGPU instance. |
| WgpuQueue |
Gets or sets the handle to the WebGPU queue. |
Methods
| Name | Description |
|---|---|
| Dispose() |
Releases the resources used by the current instance of the SKGraphiteDawnBackendContext class. |
| Dispose(Boolean) |
Releases the unmanaged resources used by the SKGraphiteDawnBackendContext and optionally releases the managed resources. |