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] Fix MatrixFilter multiplication ordering for subpasses. #43943
Merged
Conversation
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
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
jonahwilliams
approved these changes
Jul 24, 2023
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.
LGTM
We should consider cherry picking this into 3.13, if you feel confident in it.
2 tasks
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 24, 2023
auto-submit bot
pushed a commit
that referenced
this pull request
Jul 24, 2023
…sses." (#43978) Reverts #43943 Closes flutter/flutter#131182. Opens flutter/flutter#130355. Regression spotted in flutter/flutter#131182
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 25, 2023
…131225) flutter/engine@ff02fa7...4fded78 2023-07-24 skia-flutter-autoroll@skia.org Roll Skia from 6c219acc30a5 to 4554d1b35b6e (4 revisions) (flutter/engine#43973) 2023-07-24 bdero@google.com [Impeller] Fix MatrixFilter multiplication ordering for subpasses. (flutter/engine#43943) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
bdero
added a commit
that referenced
this pull request
Jul 25, 2023
Follow-up/reland of #43943. Issue flutter/flutter#130355. I've updated the golden to better reproduce the problem at hand; the second circle is a scaled down copy of the backdrop. If the matrix filter is handling the transform correctly, the circle is centered over the bottom-right-most edge (4:30) of the circle: 
bdero
added a commit
to bdero/flutter-engine
that referenced
this pull request
Jul 25, 2023
) Follow-up/reland of flutter#43943. Issue flutter/flutter#130355. I've updated the golden to better reproduce the problem at hand; the second circle is a scaled down copy of the backdrop. If the matrix filter is handling the transform correctly, the circle is centered over the bottom-right-most edge (4:30) of the circle:  (cherry picked from commit 3e5ae6a)
LouiseHsu
pushed a commit
to LouiseHsu/flutter
that referenced
this pull request
Jul 31, 2023
…lutter#131225) flutter/engine@ff02fa7...4fded78 2023-07-24 skia-flutter-autoroll@skia.org Roll Skia from 6c219acc30a5 to 4554d1b35b6e (4 revisions) (flutter/engine#43973) 2023-07-24 bdero@google.com [Impeller] Fix MatrixFilter multiplication ordering for subpasses. (flutter/engine#43943) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth
pushed a commit
to vashworth/flutter
that referenced
this pull request
Aug 2, 2023
…lutter#131225) flutter/engine@ff02fa7...4fded78 2023-07-24 skia-flutter-autoroll@skia.org Roll Skia from 6c219acc30a5 to 4554d1b35b6e (4 revisions) (flutter/engine#43973) 2023-07-24 bdero@google.com [Impeller] Fix MatrixFilter multiplication ordering for subpasses. (flutter/engine#43943) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
Aug 30, 2023
) Follow-up/reland of flutter#43943. Issue flutter/flutter#130355. I've updated the golden to better reproduce the problem at hand; the second circle is a scaled down copy of the backdrop. If the matrix filter is handling the transform correctly, the circle is centered over the bottom-right-most edge (4:30) of the circle: 
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
May 16, 2024
…lutter#43943) Resolves flutter/flutter#130355. When drawing a backdrop filter, we offset the backdrop entity with `-local_pass_position` in order to align the backdrop texture with the position of the pass it's being drawn to. When rendering the filter, this transform propagates to the filter snapshot. Prior to this change, that offset was being applied within the space of the backdrop filter's matrix, which is wrong! It needs to be applied in screen space. We didn't notice this prior to the coverage hint optimization because we were previously forcing subpass sizes to match the parent whenever a backdrop filter was present. This one was very difficult to reason through at first, and so I added a detailed comment to explain the rationale behind the behavioral differences between the backdrop filter and non-backdrop filter cases of the matrix filter.
8 tasks
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
May 16, 2024
…lutter#43943) Resolves flutter/flutter#130355. When drawing a backdrop filter, we offset the backdrop entity with `-local_pass_position` in order to align the backdrop texture with the position of the pass it's being drawn to. When rendering the filter, this transform propagates to the filter snapshot. Prior to this change, that offset was being applied within the space of the backdrop filter's matrix, which is wrong! It needs to be applied in screen space. We didn't notice this prior to the coverage hint optimization because we were previously forcing subpass sizes to match the parent whenever a backdrop filter was present. This one was very difficult to reason through at first, and so I added a detailed comment to explain the rationale behind the behavioral differences between the backdrop filter and non-backdrop filter cases of the matrix filter.
auto-submit bot
pushed a commit
that referenced
this pull request
May 18, 2024
fixes: flutter/flutter#147807 relands #43943 (with fixes that hopefully avoid it being reverted again) [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
8 tasks
auto-submit bot
added a commit
that referenced
this pull request
May 18, 2024
) Reverts: #52880 Initiated by: jonahwilliams Reason for reverting: unexpected framework golden change Original PR Author: gaaclarke Reviewed By: {bdero} This change reverts the following previous change: fixes: flutter/flutter#147807 relands #43943 (with fixes that hopefully avoid it being reverted again) [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
gaaclarke
added a commit
to gaaclarke/engine
that referenced
this pull request
May 20, 2024
fixes: flutter/flutter#147807 relands flutter#43943 (with fixes that hopefully avoid it being reverted again) [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
8 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
May 21, 2024
fixes flutter/flutter#147807 relands #52880 relands #43943 This was previously reverted because of the golden test failure `widgets.widgets.magnifier.styled`. This fixes that problem by instead of focusing on ImageFilter and BackdropFilter subpasses, instead focuses on wether a subpass is clipped or not and by extension how the math should be handled. `widgets.widgets.magnifier.styled` after diff:  [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Resolves flutter/flutter#130355.
When drawing a backdrop filter, we offset the backdrop entity with
-local_pass_position
in order to align the backdrop texture with the position of the pass it's being drawn to. When rendering the filter, this transform propagates to the filter snapshot. Prior to this change, that offset was being applied within the space of the backdrop filter's matrix, which is wrong! It needs to be applied in screen space.We didn't notice this prior to the coverage hint optimization because we were previously forcing subpass sizes to match the parent whenever a backdrop filter was present.
This one was very difficult to reason through at first, and so I added a detailed comment to explain the rationale behind the behavioral differences between the backdrop filter and non-backdrop filter cases of the matrix filter.
I also updated the golden to more clearly show the coverage leak I was getting at when I filed flutter/flutter#130355. It's not causing known issues with real widgets, however, and so I'm going to set it to the side for now.
Before:
before.mp4
After:
after.mp4