Skip to content

Resolve paint servers in masks, patterns and feImage before caching - #1164

Merged
LaurenzV merged 2 commits into
linebender:mainfrom
Cees-Kettenis:fix-feimage-shared-paint
Oct 17, 2026
Merged

LaurenzV merged 2 commits into
linebender:mainfrom
Cees-Kettenis:fix-feimage-shared-paint

Conversation

@Cees-Kettenis

Copy link
Copy Markdown
Contributor

Reusing a user-space filter containing feImage can leave object-bounding-box gradients unresolved, producing a flat fill instead of the intended gradient.

Resolve paint servers in the referenced image subtree after its bounds are calculated and before the filter enters the shared cache, because the final tree pass cannot mutate a filter with multiple Arc owners. The regression compares two filtered instances with an unfiltered use of the same source and fails on main; the fixed output matches Chrome within one channel value, and the full workspace tests pass.

Before and after rendering the same shared-filter SVG

Download the SVG reproducer

@LaurenzV
LaurenzV force-pushed the fix-feimage-shared-paint branch from 3461506 to ad4286b Compare October 17, 2026 08:14
@LaurenzV LaurenzV changed the title Resolve feImage paint servers before sharing cached filters Resolve paint servers in masks, patterns and feImage before caching Oct 17, 2026
@LaurenzV

Copy link
Copy Markdown
Collaborator

Thanks, I've generalized this so it also fixes masks and patterns, which had the same issue.

@LaurenzV
LaurenzV force-pushed the fix-feimage-shared-paint branch from ad4286b to af618b3 Compare October 17, 2026 08:18
@LaurenzV
LaurenzV merged commit 48d7286 into linebender:main Oct 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants