Expand description
Headless offscreen capture: draw into a texture with no window and read the pixels back as tight RGBA (Plan 0013). Dev/agent tooling over the native Rust API — no dependency, no present.
Not the hot path. The readback blocks (map_async + poll(Wait)); it is
only ever driven by capture/QA tooling, never wired into the live render
loop (see CLAUDE.md real-time rules). The panic-denial pragma below is kept
anyway so every file under render/ satisfies the hygiene guard.
Structs§
- Capture
Image - A captured frame: tight (row-unpadded)
Rgba8UnormSrgbpixels, row-major top-to-bottom.rgba.len() == width * height * 4. - Frame
Tap - A persistent offscreen target plus readback buffer, built once and reused for every frame of a sustained tap.