mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-28 18:22:06 +01:00
compose::bounds caches per-tile content bounds and drops entries of dead tiles when it holds more than 65,536 of them. Once more than 65,536 tiles were alive (a large document plus its history), every call (every render tile, every GPU plan) walked the whole map again and kept it all. The sweep now runs past a high-water mark: twice the entries that survived the last sweep, and at least 65,536. The per-tile scan moves to raster as Tile::content_bounds, used by both Surface::content_bounds and the cache instead of two copies of the loop; an empty pixel yields no content instead of a chunks_exact(0) panic. Claude-Session: https://claude.ai/code/session_01QUda3K786uop8kvEQoUjSf Co-authored-by: Claude <noreply@anthropic.com>