Class WebGPUSurfaceFrame
- Namespace
- SixLabors.ImageSharp.Drawing.Processing.Backends
- Assembly
- SixLabors.ImageSharp.Drawing.WebGPU.dll
A single acquired drawable frame returned by a WebGPU surface. Use the Canvas to draw the frame contents, then dispose the frame to show it on screen.
public sealed class WebGPUSurfaceFrame : IDisposable
- Inheritance
-
WebGPUSurfaceFrame
- Implements
- Inherited Members
Remarks
Disposal submits the recorded canvas work, presents the surface, releases the per-frame texture and view,
and signals the owning surface so the next TryAcquireFrame call can succeed. Only one frame can be
outstanding per surface at a time.
Properties
Canvas
Gets the drawing canvas for the acquired frame.
public DrawingCanvas Canvas { get; }
Property Value
Methods
CreateRenderTarget(int, int)
Creates an empty render target with the same texture format as this frame.
public WebGPURenderTarget CreateRenderTarget(int width, int height)
Parameters
Returns
- WebGPURenderTarget
The created render target.
Remarks
The created target does not contain a copy of this frame's pixels.
Dispose()
Disposes the frame, rendering and presenting it, then releasing the per-frame WebGPU resources.
public void Dispose()