pub struct FrameTap { /* private fields */ }Expand description
A persistent offscreen target plus readback buffer, built once and reused for every frame of a sustained tap.
The difference from the rest of this file is lifetime, not stage. Every other
capture entry point builds its target and buffer per call — right for QA
tooling that takes one frame, and wrong for a source that takes 864,000 of
them, where per-frame texture and buffer creation is GPU allocation inside
the loop. capture_stream already reuses its pair, but only for the length
of one fixed-dt, one-preset run it drives itself; this type hands that
reuse to a caller who owns the loop.
Sized at construction and never resized. record_copy’s extent, the
buffer’s length and padded_bpr are all fixed against width×height, so a
renderer that resizes underneath a live tap needs a new one — open_tap
is the only thing that sets these.