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]>
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]>
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]>