Files
punktfunk/crates/pf-capture
enricobuehler 7f6d1622ee test(pf-capture): pin the composite-cursor regen key and the blend retry escalation
The two pieces of logic the previous commit added had no tests, and both are
the kind that fail silently in opposite directions.

`blend_key_of` is now ONE definition shared by the regen test and the blend
itself, rather than the same tuple built at two call sites. That drift is the
actual bug shape: a key that reports "changed" while the drawn frame is
identical re-encodes for nothing, and a key that reports "unchanged" while the
pointer moved freezes it on screen. Both directions are asserted — a hidden
pointer keys identically wherever it moves, and every visible change (position,
shape serial, and the visible→hidden transition that must strip the pointer
from the frame) moves the key.

`next_blend_backoff` is extracted for the same reason `mono_planes_to_rgba`
was: the arithmetic a bug hides in does not need a live D3D11 device around it
to be checked. The test walks the escalation well past its ceiling and asserts
it PARKS there — an unbounded doubling would mean a device that comes back
after a long stall never gets picked up.

Verified: `scripts/xcheck.sh windows` green; `cargo fmt --all` clean. The tests
themselves compile and run only on Windows (the module is `cfg(windows)`), so
they are pending a run on a box.
2026-08-08 15:31:18 +02:00
..