The replay half of primitives_for_placement_verified’s contract: the
command’s verification state plus the stale-transition seam. The caller
(the scene builder, which owns the per-command registry) says whether a
valid previous-frame emission is on hand; verification answers whether
this frame collapsed out of its capture and was therefore NOT emitted —
nothing materialized, the caller must re-emit its saved emission.
The full retained form: the compact recording buffers come from and
return to the caller alongside the materialized primitives, so a command
re-recording every frame allocates nothing in the steady state.
primitives_for_placement recording into storage the caller retains
between frames. A command that re-records every frame keeps one buffer
whose capacity was earned on earlier frames; only the rare marker-bearing
recording pays for a second output vector.
primitives_for_placement_retained with per-command similarity
verification: when replay carries the command’s state, the freshly
recorded compact form advances it BEFORE materialization, yielding the
frame’s retained/dynamic span structure in primitive space. Rendering
still materializes everything — consuming the spans (and skipping
materialization for retained ones) is the renderer-side half of the
retention work. The frame is only returned for marker-free recordings:
content splitting reindexes the primitive vector, and no game-scale
command records content markers.
apply_layer_to_brush without the solid-brush clone: the borrowed
brush’s color is copied (or layer-adjusted) inline, and only gradients
are cloned. Produces exactly the values apply_layer_to_brush would —
both branches below mirror its fast path and its Solid arm verbatim.