This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] only use framebuffer advanced blends if available. #52284
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a0a9c62
[Impeller] only use framebuffer advanced blends if available.
a2f9cad
Update blend_filter_contents.cc
9d8ae07
make spec test use glpyh shader instead.
427da51
Update blend_filter_contents.cc
180c3fa
Merge branch 'main' into combine_blends
2dfc062
Fix premultiplication.
9707132
++
6fc0314
Merge branch 'combine_blends' of github.com:jonahwilliams/engine into…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,23 @@ class BlendFilterContents : public ColorFilterContents { | |
| std::optional<Scalar> alpha, | ||
| ColorFilterContents::AbsorbOpacity absorb_opacity) const; | ||
|
|
||
| /// @brief Implements the advanced blends filters in terms of the framebuffer | ||
| /// blend filters. | ||
| /// | ||
| /// This requires device support for frameuffer fetch, | ||
| /// `Capabilities::SupportsFramebufferFetch` must be true | ||
| /// This allows a substantial reduction in the number of bootstrapped | ||
| /// shaders. | ||
| std::optional<Entity> CreateFramebufferAdvancedBlend( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also document the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Framebuffer advanced blends vs the other kind (pipeline blend?) I think are our own inventions of terminology (which totally make sense). But it would be good to point it out either here or in a glossary. |
||
| const FilterInput::Vector& inputs, | ||
| const ContentContext& renderer, | ||
| const Entity& entity, | ||
| const Rect& coverage, | ||
| std::optional<Color> foreground_color, | ||
| BlendMode blend_mode, | ||
| std::optional<Scalar> alpha, | ||
| ColorFilterContents::AbsorbOpacity absorb_opacity) const; | ||
|
|
||
| /// @brief Optimized porter-duff blend that avoids a second subpass when there | ||
| /// is only a single input and a foreground color. | ||
| /// | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I thought we were always doing this. So this is is only ever relevant on OpenGL ES and the desktop Metal (which I keep forgetting exists) stuff right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And iOS simulator!