Files
photocraft/crates/engine
xwizeandClaude Opus 5.5 d73604860e Indexed Color: remap only the pixels a stroke changed, a tile at a time
Review follow-up. The palette step quantised the whole stroke damage
rectangle as one dense buffer. A long diagonal stroke on a large canvas has
a rectangle near the size of the document, so this allocated about 28 bytes
per pixel of it. It also remapped pixels inside that rectangle the brush
never touched, which can already be off the table (Paint Bucket doesn't
snap yet).

keep_in_color_table now walks the rectangle tile by tile and maps only the
pixels that differ from the surface before the stroke (a cheap clone: tiles
are shared until written). The live preview compares against its own
pre-stroke surface the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:33:48 +01:00
..