-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] blur - cropped the downsample pass for backdrop filters #53562
Conversation
|
Also worth noting: this isn't good to land yet because it introduces shimmering in animation. I think we may be able to eliminate that by adding padding to make sure that when downsampling we end up with integer size. That would require us to modify the |
|
This breaks image filters currently. I gotta go back and see what happened there. |
…side of the snapshot
| #include "impeller/renderer/render_pass.h" | ||
| #include "impeller/renderer/vertex_buffer_builder.h" | ||
|
|
||
| #pragma GCC diagnostic ignored "-Wunused-function" |
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.
nit: remove
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.
done
| ISize source_size = ISize(aligned_coverage_hint.GetSize().width, | ||
| aligned_coverage_hint.GetSize().height); | ||
| Vector2 downsampled_size = source_size * downsample_scalar; | ||
| Scalar int_part; |
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.
You can also add [[maybe_unused]]
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.
I think I did that in the past and the compiler for fuchsia or windows didn't care =T
jonahwilliams
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.
LGTM!!!!!!!!
|
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. |
bdero
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.
The restrictions on applying the coverage hint LGTM!
| // coverage hint that fits inside of the snapshots coverage that means the | ||
| // coverage hint was ignored so we will trim out the area we are interested | ||
| // in the down-sample pass. This usually means we have a backdrop image | ||
| // filter. |
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.
Ah, the described behavior happens whenever there's a Texture filter input, right? Makes sense that we need to do some extra work to apply the coverage hint for backdrop filters here.
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.
Ah, the described behavior happens whenever there's a Texture filter input, right?
Yep, exactly.
…150888) flutter/engine@1d5e3cc...a9194f0 2024-06-26 [email protected] Roll Skia from 173ee0af82c9 to 55ada83438cd (3 revisions) (flutter/engine#53596) 2024-06-26 [email protected] Return a null image from ImageExternalTextureGL::CreateEGLImage if an EGL display is not available (flutter/engine#53594) 2024-06-26 [email protected] [Impeller] blur - cropped the downsample pass for backdrop filters (flutter/engine#53562) 2024-06-26 [email protected] Roll Skia from 0a979d9f3606 to 173ee0af82c9 (2 revisions) (flutter/engine#53593) 2024-06-26 [email protected] Remove otherwise unused third_party/web_dependencies. (flutter/engine#53588) 2024-06-26 [email protected] Copy `flutter/flutter/docs/engine` to `flutter/engine/docs` as-is (no changes) (flutter/engine#53595) 2024-06-26 [email protected] Roll Dart SDK from 38bb74f63829 to c01f907d34d8 (5 revisions) (flutter/engine#53585) 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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
|
Hmm, there was no change in our benchmark: https://flutter-flutter-perf.skia.org/e/?keys=X6db42c30be541ffea6a232432d0e198b That's odd since we see something completely different in local testing. |
|
That metric does not measure GPU memory FYI |
My local testing is showing 1/2 (500MB->250MB) memory size and 1/5 gpu (250MB->50MB) memory above. So I would expect some change. |
|
Its only capturing some portion of the overall heal though, Is your first number Host + GPU memory? I wouldn't but too much stock in it, we have the local numbers that are easily reproducible. |
|
*heap |
|
*but -> put Man I can't spell today |
|
Ugh, yea it's just frustrating. I just verified it locally and I'll file an issue. Those probes seem bogus. |
|
filed issue here: flutter/flutter#150936 |
|
We can add our own tracker in allocator_mtl, for example on Vulkan: https://github.com/flutter/engine/blob/main/impeller/renderer/backend/vulkan/allocator_vk.cc#L512 |
…lutter#150888) flutter/engine@1d5e3cc...a9194f0 2024-06-26 [email protected] Roll Skia from 173ee0af82c9 to 55ada83438cd (3 revisions) (flutter/engine#53596) 2024-06-26 [email protected] Return a null image from ImageExternalTextureGL::CreateEGLImage if an EGL display is not available (flutter/engine#53594) 2024-06-26 [email protected] [Impeller] blur - cropped the downsample pass for backdrop filters (flutter/engine#53562) 2024-06-26 [email protected] Roll Skia from 0a979d9f3606 to 173ee0af82c9 (2 revisions) (flutter/engine#53593) 2024-06-26 [email protected] Remove otherwise unused third_party/web_dependencies. (flutter/engine#53588) 2024-06-26 [email protected] Copy `flutter/flutter/docs/engine` to `flutter/engine/docs` as-is (no changes) (flutter/engine#53595) 2024-06-26 [email protected] Roll Dart SDK from 38bb74f63829 to c01f907d34d8 (5 revisions) (flutter/engine#53585) 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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md






This should be no functional change, just makes the case of clipped backdrop filters take up less memory.
fixes: flutter/flutter#150713
test coverage:
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.