diff --git a/docs/IRIS.md b/docs/IRIS.md index fd0b9c5..1d6d230 100644 --- a/docs/IRIS.md +++ b/docs/IRIS.md @@ -827,3 +827,23 @@ still not root-caused). both CPU-side caches otherwise kept pointing at the old, now-destroyed device's textures, which is why text used to vanish again after leaving and returning to the app. + +## 2026-09-06: `take_counters` counts text layouts too + +One public API change, from the verification pass over the composer-scroll +and per-block-row work (RUST.md's "Verification pass over Tasks A and B"). + +- **`UiRenderState::take_counters` returns four numbers, not three**: + `(draws, region rewrites, move writes, **text shapes**)`. The new one is + bumped in `Painter::render_text`, which `TextView::render` only reaches + on a cache miss, so it counts layouts actually computed rather than + layouts asked for. Callers destructuring the tuple need one more `_`. + + It exists because a draw counter cannot answer the question the + per-block transcript row was built for. A widget can be redrawn without + re-shaping (the layout is memoized by width) and re-shaped without any + extra draw, and re-shaping is the expensive half — so "a streamed delta + costs one block" was, until now, argued from the code rather than + measured. With the counter it is a test: one delta into a 100-paragraph + reply shapes exactly **1** text layout, the same as into a + one-paragraph one.