diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 4b9bb90..5f7877d 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -218,8 +218,10 @@ fn snap_floor(v: vec2) -> vec2 { } ``` -A rendering decision, so proposed rather than made. The check is the -reference render set plus the oracle; expect `tabs` to move its arcs back. +Approved by Bryan on 2026-09-17, together with rounding on the CPU; see +item 5 under "Next" for why both, and what each does not fix. The check is +the reference render set plus the oracle; expect `tabs` to move its arcs +back. ### Smaller items @@ -641,8 +643,21 @@ In order, from the review above and Bryan's steer (2026-09-17): 3. Keep the `DrawInfo` on `ActiveData`; delete the copied fields and the reconstruction in `redraw`. 4. `Span`'s leftover boundary through `Holds::through`. -5. The shader snap, if Bryan takes it: change, then the render set and the - oracle. +5. **Round on the CPU and snap to the nearest pixel in the shader**, as + one change with one verification. Bryan approved the snap on 2026-09-17 + (rendering may change wherever it brings the screen closer to what the + user's code says: three equal sections of 1000 px need one of them + rounded up). CPU rounding is recommended for a different reason: a + `Rel` is off by at most `2^-25` of its box, so with round-to-nearest + every product whose true value is a whole number of steps is exact for + boxes under about 8,000 px, where truncation leaves half of them one + step short and layout then decides "does not fit" on a container the + user meant to fit exactly. Use the branchless round-half-up form, + `(a * b + (1 << (BY - 1))) >> BY`, not the sign-branching + `shift_round`; re-derive `Holds::through` for `round` (its two shifted + bounds move by half a `Rel` step); check with `nm` that `UiSpan::within` + still inlines; expect a couple of percent of instructions and re-run the + long fuzzers and the render set once for both. 6. The smaller items: the stale `f32` comment, the gap of an undrawn child, confirm nested `leftover` weights, one zero-divisor fallback. 7. `LazySpan`, the next LAYOUT.md ยง2 item. Region nodes cover the movable