Description
Steps to reproduce
This bug is being re-posted after request(flutter/engine#48472 (comment), flutter/engine#48472 (comment))
Flutter 3.18.0-11.0.pre.55 • channel master • https://github.com/flutter/flutter.git
Framework • revision 0b6da5b450 (3 hours ago) • 2023-12-14 18:16:50 -0500
Engine • revision 0b0fab8215
Tools • Dart 3.3.0 (build 3.3.0-220.0.dev) • DevTools 2.30.0
Problem:
Text that is being blurred now flickers during a scroll. If the text is held still under the blur there is no flicker, however when scrolling, then a flickering of the text occurs. The problem seems to get worse when a finger is lifted and the scroll slows down with friction scrolling.
In my case, this is happening when using a scrollable Listview
that contains black text on a white background. Overlaying the listview is a blurred Container
created using a BackdropFilter
.
The listview and the container live together in a Stack
widget
Here's a video showing the problem from the simulator. The problem is a bit more apparent on a real device, but for sure its there on the simulator
EDIT/UPDATE: Images also flicker
Screen.Recording.2023-12-14.at.5.51.56.PM.mov
Problem source:
The problem starting occurring with the launch of the new blur
flutter/engine#48472 (or possibly flutter/engine#49038). Both those updates are in commit 0b6da5b45088bb1d8a9b1d1e89f3b7d1437390c4
which is where the problem has started. It looks like that commit will be reverted soon, so lets enjoy the problem while it lasts
Expected results
No flickering of text
Actual results
Flicker of text
Code sample
Code sample
My code is quite large and will be difficult to put here, but conceptually it is a container with a backdrop filter sitting in a stack on top of a lsitview
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[Paste your output here]
Activity
[-]The new blur is causing text to flicker[/-][+]The new blur is causing text (and images) to flicker[/+]huycozy commentedon Dec 15, 2023
Hi @mark8044
I'm checking this on the same master channel version with below sample code but can't seem to see the issue.
Sample code
Demo video (iPhone 7, iOS 15.8)
RPReplay_Final1702633829.mp4
Could you also try this sample code on your end and confirm? If the sample needs to be updated, please help to do.
mark8044 commentedon Dec 15, 2023
Your sample doesn't do it because your SigmaX and SigmaY are too low. If you put it up to say 20 for example, you will see the problem.
Here is an example where I set it to 40
Screen.Recording.2023-12-15.at.7.02.21.AM.mov
gaaclarke commentedon Dec 15, 2023
I think this is related to subpixel alignment in the downsampled image. Once the pixels get bigger, the subpixel math becomes more prominent. It's going to be tricky to fix. Thanks for reporting.
mark8044 commentedon Dec 15, 2023
@gaaclarke
Incase its meaningful: Blurring as it stood, just before yesterdays commit was absolutely perfect to my eyes at least. Very smooth, lag free and platform native appearing. And very performant (on my devices: iPhone X, iPhone 13, iPhone 14 pro, S21 Samsung).
I know there have been other improvements to backdrop filter blur in the past few weeks and they were all really good too.
Hope this extra information has some significance
danagbemava-nc commentedon Dec 18, 2023
Hi @mark8044, which of the sigma values did you set to 40? When I set both to 40, the blur is barely visible and if I set it to 20 (for both), I do not see the issue on my iPhone XS. I tested on the latest master. Please see the recordings below
recordings
RPReplay_Final1702874954.MP4
RPReplay_Final1702874982.MP4
flutter doctor -v
gaaclarke commentedon Dec 18, 2023
@danagbemava-nc the new blur is off by default now. There were some benchmarks that were experiencing memory problems after it landed. This bug is still relevant.
8 remaining items
jonahwilliams commentedon Jan 8, 2024
I think this issue is covered by the bugs that have already been filled but there is a lot of good info here so I will leave it open.
[Impeller]: new blur - adds mips for backdrop filters (#49607)
ImageFilter.blur
#141510jonahwilliams commentedon Jan 22, 2024
We think this is fixed now. CLosing.
github-actions commentedon Feb 6, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -v
and a minimal reproduction of the issue.