mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-26 10:57:20 -06:00
Brush phase 4. On release the canvas dropped its live stroke and ran `paint.stroke` over every point again (the whole stroke re-rendered), then re-composited the stroke's bounding box, although the canvas already showed exactly those pixels. Long strokes froze for 100–250 ms at mouse-up (#2068). - `Session::offer_live_stroke` hands the finished live stroke to the next command. A `paint.stroke` / `paint.pencil` whose command, document revision, params, seed and points match it exactly takes its pixels instead of rendering (result `"fromLive": true`). Anything else ignores the offer and renders as before. It still runs through the normal dispatch (authorization, journal, one history step), and a replay renders identical pixels. - The canvas feeds the release frame's last points to the live stroke first, then remembers the stroke's per-step damage for one revision (`CommittedStroke`): each canvas cache re-composites only the steps it hadn't shown, usually nothing, instead of the bounding box. - P32 (brush release on a long stroke) becomes measurable: perf_scenarios times a 600-point 200 px soft stroke on 24 MP. 136 ms → 0.83 ms on the GPU canvas, 257 ms → 0.71 ms on the CPU canvas (RTX 5090, release). Budget 16 ms, not enforced until a baseline run. - Scorecard: TOOL-213-10 (⌃⌥-drag resize with readout) is done; TOOL-213-7 (live strokes for every brush-based retouch tool) is partial (Spot Healing, Mixer Brush, Background Eraser and Pattern Stamp still aren't live).