Commit Graph
3 Commits
Author SHA1 Message Date
vangel76andClaude Sonnet 5.5 0d69d40c6b perf(paint): key the pattern cache on normalised levels, make the eviction test independent
The key now uses the brightness and contrast values Texture::level uses (clamped, non-finite as 0, -0.0 as 0.0), so equal levels share one entry. The cache logic moves into a PatternCache struct so the eviction test runs on its own instance instead of the shared static.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-04 01:51:30 +01:00
vangel76andClaude Sonnet 5.5 c2a6a80b1f paint: refresh a duplicate pattern-cache key; test eviction and key separation
CodeRabbit review points: a duplicate insert should promote the entry, the key-separation test could pass after the base entry was evicted, and the entry limit was untested.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-04 00:18:41 +01:00
vangel76andClaude Sonnet 5.5 90e1e359f1 perf(paint): cache procedural brush textures between strokes (#11134)
BrushContext::new regenerated the procedural texture and re-applied its levels for every stroke and every symmetry pass. A bounded LRU (4 entries, 16 MiB) keyed by style, size, seed and the level settings returns the identical image. Refs #11134.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-03 19:50:53 +01:00