Lightningbeam/lightningbeam-ui/lightningbeam-editor
Skyler Lehmkuhl aae51e3b3c Phase 3d: dirty-rect diffs for raster undo (bound undo-history RAM)
`RasterStrokeAction`/`RasterFillAction` stored the whole before+after RGBA frame
(~16 MB/action at 1080p → up to ~1.6 GB at the 100-action cap). They now store a
`RasterDiff` — only the changed bounding box's pixels before and after — computed
once in `new()` from the full buffers, which are then dropped. A brush dab shrinks
from ~16 MB to tens of KB; a full-canvas fill is unchanged (its bbox is the frame).

Paging interaction: a diff overwrites just the bbox, so the keyframe's pixels must
be resident when undo/redo applies. A clean evicted frame's container bytes equal
its current logical state, so the editor faults the target frame in (synchronously)
before undo/redo via a new `Action::raster_resident_hint` + `peek_undo/redo_raster_hint`.
Dirty frames are never evicted, so they're already resident. If a base is somehow
not resident the apply is skipped (logged), never resized-and-corrupted.

Unit tests cover exact before/after round-trip, blank-first-stroke, no-op, and the
non-resident-base skip.
2026-06-20 21:31:38 -04:00
..
assets Add tool skeletons 2026-03-06 07:22:50 -05:00
examples rewrite unsafe code in ffmpeg ffi 2026-02-15 23:35:30 -05:00
src Phase 3d: dirty-rect diffs for raster undo (bound undo-history RAM) 2026-06-20 21:31:38 -04:00
Cargo.toml Bump version to 1.0.4-alpha 2026-06-02 14:37:07 -04:00
PLAN.md Toolbar 2025-11-13 18:12:21 -05:00
TOOL_IMPLEMENTATION_PLAN.md Select and move shapes 2025-11-18 00:22:28 -05:00
build.rs Add orchestral sampled instruments 2026-02-21 07:28:19 -05:00