figcraft/crates/render
BFlat 4904303fc2
M8: retained canvas correctness (#89)
* M8: retained canvas correctness

Drags now show live on the canvas. The canvas used to drop every finished
render whose request had been superseded, and it asks for the next render
before it polls. So while an edit lands every frame (any drag), no image was
ever shown until the pointer was released. Holding the button still made it
worse: the same move ran the gesture again each frame, built a new document
and asked for a new render, which kept the canvas stuck on the pre-drag image.

- Canvas: show every finished render (renders finish in order; the image is
  re-projected to the current view). The generation filter is gone.
- Engine: Session::pointer skips a drag move identical to the last one, and
  Session::preview keeps the document when the preview changes nothing (a
  handle held still).
- Render: clip and layer rectangles snap edges that are within float noise of
  a pixel boundary before rounding outwards. An edge exactly on a boundary came
  out a hair to either side depending on the render's origin, so a clip let a
  whole column through in some renders and not others.
- Tests: a seeded random walk compares the retained render with a full render
  after every step: edits, undo/redo, reparenting, masks, groups, effects,
  strokes, text, auto layout, instances, variables, styles, pans and zooms. It
  found the clip-edge divergence; a minimised regression test covers it. Also
  a headless UI test for a live drag, and engine tests for skipped repeated
  moves and unchanged previews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* M8: retained canvas tests follow the new blur effect type

Layer blurs are `LayerBlur(Blur)` since the progressive blur landed; the random
walk now also tries progressive layer blurs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:40:26 +07:00
..
src M8: retained canvas correctness (#89) 2026-10-10 18:40:26 +07:00
Cargo.toml M3: paint: colour profiles (Display P3), image adjustment presets, style picker (#54) 2026-10-10 07:38:17 +07:00