Skip to content

peniko: add BlendMode::is_destructive#166

Merged
waywardmonkeys merged 1 commit intolinebender:mainfrom
waywardmonkeys:destructive-blends
Apr 16, 2026
Merged

peniko: add BlendMode::is_destructive#166
waywardmonkeys merged 1 commit intolinebender:mainfrom
waywardmonkeys:destructive-blends

Conversation

@waywardmonkeys
Copy link
Copy Markdown
Collaborator

@waywardmonkeys waywardmonkeys commented Apr 16, 2026

This exposes whether a blend mode can make destructive changes to the backdrop, so renderers can avoid optimizations like skipping transparent paints when they would be invalid.

@waywardmonkeys
Copy link
Copy Markdown
Collaborator Author

This is upstreaming some code from vello_common.

Comment thread peniko/src/blend.rs Outdated
This exposes whether a blend mode can make destructive changes to the backdrop, so renderers can avoid optimizations like skipping transparent paints when they would be invalid.

Co-authored-by: Laurenz Stampfl <47084093+LaurenzV@users.noreply.github.com>
Copy link
Copy Markdown
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me for this to live in Peniko.

@waywardmonkeys
Copy link
Copy Markdown
Collaborator Author

Makes sense to me for this to live in Peniko.

Yeah, I actually have a use case for it outside of Vello. :)

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Apr 16, 2026
Merged via the queue into linebender:main with commit ff838ad Apr 16, 2026
15 checks passed
@waywardmonkeys waywardmonkeys deleted the destructive-blends branch April 16, 2026 10:53
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.

3 participants