Expand description
Frame readback types and PNG encoding helpers. Swapchain readback, row padding, and PNG encoding for visual tests.
Structs§
- Capture
Params - Parameters for one capture readback.
- Captured
Frame - A captured frame read back from a render target.
Enums§
- Captured
Frame Format - 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.