Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@flar
Copy link
Contributor

@flar flar commented Oct 4, 2024

The blur ImageFilter has a tile mode that describes how to sample pixels near the edge of the source. When used as a BackdropFilter this behavior is important as the wrong tile mode can cause distracting flashing as app content is scrolled under foreground widgets that blur their background. Unfortunately the Skia backend used to default the tile mode for all backdrop filters to clamp mode with no way to update it and that mode was the one that produced the most distracting flashing.

Recently Skia opened up control over the tile mode used for backdrop filters and we now take advantage of that capability so that app developers can now set the tile mode to a nicer value.

@flar flar requested a review from jonahwilliams October 4, 2024 00:42
@flar
Copy link
Contributor Author

flar commented Oct 4, 2024

I have the default set to clamp because that was what Skia used to do, but it should never get used if the filter isn't a blur so I'm not sure it matters. I could also use mirror since that is what we plan to change the default to for backdrop operations when we implement ImageFilter default tile modes...

Thoughts?

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'd anticipate some pixel diffs in g3 but as long as the number is manageable the roller should be able to deal with this.

@flar
Copy link
Contributor Author

flar commented Oct 4, 2024

LGTM

I'd anticipate some pixel diffs in g3 but as long as the number is manageable the roller should be able to deal with this.

Since the default is the same as what Skia used to do, this could only cause diffs if some test in G3 was using an ImageFilter that they explicitly set to some tile mode other than the default. How likely is that?

@flutter-dashboard
Copy link

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.

Changes reported for pull request #55640 at sha 4b44a2f

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #55640 at sha b861995

@flar
Copy link
Contributor Author

flar commented Oct 4, 2024

The goldens all look good to me, I've left them untriaged for review.

The source image is a checkerboard of colored squares divided into quadrants of 4 colors, but with a single pixel border of magenta all around to make the clamping obvious. You can see the pattern somewhat in the decal images and then the mirror/repeat images show the effect of grabbing data from the near edge vs the far edge...

@flar flar requested a review from jonahwilliams October 4, 2024 11:37
@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 5, 2024
@auto-submit auto-submit bot merged commit 6d6bc39 into flutter:main Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 5, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 5, 2024
…156266)

flutter/engine@92b5b31...6d6bc39

2024-10-05 [email protected] Honor blur tile mode in BackdropFilter widget on Skia backend (flutter/engine#55640)
2024-10-05 [email protected] [Impeller] remove aiks color_filter and image_filter types. (flutter/engine#55654)
2024-10-05 [email protected] Roll Dart SDK from c1c971fd1b94 to 9aa80e32947d (1 revision) (flutter/engine#55673)
2024-10-05 [email protected] [Flutter GPU] Add WindingOrder. (flutter/engine#55413)

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] 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
hubot pushed a commit to google/skia that referenced this pull request Oct 23, 2024
Fixes flutter/engine#55640 for Flutter Web

Change-Id: I7396dfb4e40a69c96ffd11825841cd1b2910bd64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/912262
Reviewed-by: Kaylee Lubick <[email protected]>
Commit-Queue: Harry Terkelsen <[email protected]>
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…r/engine#55640)

The blur ImageFilter has a tile mode that describes how to sample pixels near the edge of the source. When used as a BackdropFilter this behavior is important as the wrong tile mode can cause distracting flashing as app content is scrolled under foreground widgets that blur their background. Unfortunately the Skia backend used to default the tile mode for all backdrop filters to `clamp` mode with no way to update it and that mode was the one that produced the most distracting flashing.

Recently Skia opened up control over the tile mode used for backdrop filters and we now take advantage of that capability so that app developers can now set the tile mode to a nicer value.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App will affect goldens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants