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] Reland of Simplify Advanced Blend color filters with a foreground color. #40927
Merged
auto-submit
merged 9 commits into
flutter-team-archive:main
from
jonahwilliams:pipeline_blend_simplify
Apr 10, 2023
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
afb596d
fix advanced blend inlining
09a3026
Merge branch 'master' of github.com:flutter/engine into pipeline_blen…
8cf0278
++
0410f7b
move around
5ab53e3
++
f682b36
use anon contents
6d65a18
use getCoverageUVs correctly
f3ce098
Merge branch 'main' into pipeline_blend_simplify
16734d2
Merge branch 'main' into pipeline_blend_simplify
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
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.
The transform of the snapshot needs to either be absorbed or deferred, otherwise this won't render correctly when the
FilterInputdecides to defer the transform and returns a non-identity matrix (TextureFilterInputorContentsFilterInputholding aTextureContentssometimes defer their transforms to avoid unnecessary extra passes).You can either absorb the snapshot transform by applying it to the positions (take the snapshot texture bounds and multiply by the transform) or draw the coverage rectangle and transform the texture coordinates instead (
GetCoverageUVscomputes the correctly transformed UVs for this).Coverage rects and snapshot transforms computed by
FilterInputs are already in screen space relative to theEntityPasstexture position, and so the only difference between rendering into an inline subpass (current behavior of the blend filter) vsContents::Renderis that stuff rendered in a subpass needs to be shifted by the negative coverage origin (assuming the texture size is optimal), and then shifted back by pre-translating the transform in the returned Entity.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.
Got it, I took another look at this and found that I was more or less applying the origin offset twice since I was still appending the transform shift to the entity transform - which explained the difference.
This now uses getSnapshotUVs and renders correctly in both scenarios.