Module capture

Source
Expand description

Frame readback types and PNG encoding helpers. Swapchain readback, row padding, and PNG encoding for visual tests.

Structs§

CaptureParams
Parameters for one capture readback.
CapturedFrame
A captured frame read back from a render target.

Enums§

CapturedFrameFormat
Pixel format for captured frames.

Functions§

bgra_to_rgba_in_place
Swaps R and B channels in-place (BGRA to RGBA).
bytes_per_row_padded_256
Returns a row byte length rounded up to wgpu’s 256-byte copy alignment.
encode_png_rgba
Encodes a tight RGBA8 buffer as PNG.
unpad_rows_rgba
Strips row padding from a mapped texture buffer into a tight row layout.