evict charged snapshot k for path k-1's tiles only, but snapshot k holds every
pixel after k paths and shares tile handles with the others. After an older
snapshot was evicted, a newer one could retain a whole older generation (full
fill, one-tile stroke, full fill, one-tile stroke) and the 256 MiB cap was
exceeded. Walk newest to oldest and charge only handles not already held by the
live pixels, the edited snapshot or a kept newer snapshot. Also drop the
debug_assert from non-test code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Follow-up to #133's review notes.
- The cache key now covers the owner layer's and texture set's channels, and
each path's brush alpha image, so changing them repaints instead of reusing
stale pixels.
- The cache keeps a snapshot after each path and the tiles each path painted.
An unchanged path above an edit reuses its tiles when the edit didn't reach
them; removing a path reuses the paths above it.
- Snapshots stay within 256 MB, oldest dropped first, keeping the one below the
path being edited so live edits start there.
- Path repaints ignore the quick mask: a path paints only from what it stores.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
layer.add.image read the projection params only when `projection` was
given, so an offset or rotation alone was dropped. The features list no
longer promises a cylindrical offset.
The projection rows push the Roughness channel below the Properties
panel's edge, where a click on its menu button lands outside the panel.
The test scrolls the channel into view and waits for the scroll.
Flipping every fill image on a normal channel in a DirectX project
would also flip the OpenGL maps MaterialX import puts there, and change
how existing DirectX projects look. Fill images read as before; the
setting covers mesh map images (converted when set, so the tooltip
says to set them again) and the export default.
A fill's properties showed only its projection and scale, and
layer.fill.projection rebuilt the projection from its params, so
changing the scale reset a rotation set before and no offset could be
set at all. The command now changes only the fields it is given
(scale, also per axis; rotation; offset; sharpness; axis) and keeps the
rest while the kind stays the same. Properties show the UV rotation and
offset, the tri-planar blend sharpness, and the axis and world offset
of planar and cylindrical projections.
The project's normal map format (OpenGL or DirectX) could only be set
by command or a template, and fill images on a normal channel were
always read as OpenGL, so a DirectX map's detail came out inverted.
Texture Set Settings now has a Normal map format row, and a fill's
image on a normal channel is read in that format, as mesh map images
already were. A change of format recomposites the sets.
Editing a path repaints only it and the paths above it: the sublayer's pixels
after the paths below are cached (keyed by those paths, the mesh and the
texture size) and reused while the edit goes on. A unit test checks the cached
repaint matches painting every path.
Adds a UI test for the path rows (pick to edit, pick again to finish, remove)
and a properties-paths frame to the offscreen window snapshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>