mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-28 20:07:05 -06:00
* CPU effect maps: key fill layers by their cached pixels, drop opacity/visible The layer-effect map cache keyed a Fill layer by its Fill spec alone. But what shapes the maps is the layer's cached pixels whenever they still match the fill (what a PSD import stores and Image > Transform / crop / canvas ops rewrite in place, without touching the spec): after such a rewrite the CPU compositor kept serving the pre-rewrite maps, so flattens and the CPU canvas showed the drop shadow of the pre-rewrite shape while the GPU canvas was correct - until budget eviction or a purge. The key now hashes the cache surface's tile fingerprint while it matches the fill, like the GPU's fx::shape_key/group_key already did. layer.opacity and layer.visible leave the key: the maps depend only on fill_opacity (opacity is applied when the maps are composited, visibility only skips the lookup), so an opacity slider drag or a visibility toggle rebuilt every shadow and glow map over the whole layer for nothing. Again matching the GPU key. * Effect-map key: keep child visibility/opacity/blend for groups A styled group's maps come from its children's composite, so hiding a child or changing its opacity (or blend, clipping) must change the key; only the top layer's own visible/opacity stay out. Adds a warm-vs-purged render test for a group with a drop shadow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Effect-map test: name the edit tuple type (clippy type_complexity) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>