-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Make matrix image filter in saving layer work as expected #40171
[Impeller] Make matrix image filter in saving layer work as expected #40171
Conversation
chinmaygarde
left a comment
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.
Thank you so much! Minor nits but lgtm otherwise.
| input_snapshot->texture->GetYCoordScale(); | ||
|
|
||
| auto transform = entity.GetTransformation() * effect_transform; | ||
| auto transform = entity.GetTransformation() * effect_transform.Basis(); |
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 given effect transform should already have its translation/projective coords stripped. Can we remove the Basis() calls here and in the gaussian blur?
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 given effect transform should already have its translation/projective coords stripped. Can we remove the
Basis()calls here and in the gaussian blur?
I modified the implementation of FilterContents::SetEffectTransform, because MatrixImageFilter needs an original matrix instead of a stripped one, otherwise the result will be incorrect (such as when nesting Transformed widget). So I added Basis() to blur and morphology.
void FilterContents::SetEffectTransform(Matrix effect_transform) {
- effect_transform_ = effect_transform.Basis();
+ effect_transform_ = effect_transform;
}
fix flutter/flutter#121893
fix flutter/flutter#120879
This PR tries to distinguish whether it is a subpass scene (aka. save layer) in MatrixImageFilterContents, and do different processing for subpass scenes.
without patch
with patch
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.