-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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
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.
@@ -93,7 +93,7 @@ std::optional<Entity> DirectionalMorphologyFilterContents::RenderFilter( | |||
frame_info.texture_sampler_y_coord_scale = | |||
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.