-
Notifications
You must be signed in to change notification settings - Fork 6k
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.
This doesn't actually do anything, instead it forces opaque to false. If developers want opaque to be false, they can just set it directly.
I recall this hack fixing a whole lot of measurable jank issues listed in #39359, and we had confirmation from customers who could reliably reproduce jank that it fixed their issue (flutter/flutter#103847). I would prefer us not to remove it speculatively though indeed it looks unnecessary and crazy.
We should absolutely remove it as 1) we were never able to repro anything in our devicelab and 2) developers can opt into the existing mode by setting opaque = false. All this change did was break direct2display. |
Breaking direct-to-display is pretty severe and if we can't measure the improvement in any benchmark, I think we should go ahead with this. |
It was pretty reliably manually reproducible (check out the video) #39359. I agree it would be better if we had benchmark that definitely showed hitching went down, and removing it made hitching go up. But given the issue was widely seen in the wild, and this weird hack was widely confirmed to fix it, I'd value that over our incomplete benchmarks. I agree though we don't need to keep weird hacks around forever as superstition, but given the number of 👍 in the issues this closed, I think it's worth investigating whether it's still needed. cc @luckysmg who found the hack, as well as some investigated some alternatives. |
Can we opt them into it? The weird hack improved the hitching by a lot, without needing to change anything themselves. |
I m not sure whether the junk will regress if this hack removed now. Engine code has change a lot since I last seen haha |
Absent specific evidence that something is an improvement, we should follow apple guidelines which specifically call out this property in the metal developer tools: https://user-images.githubusercontent.com/8975114/234942519-fba0982a-e2c3-4bee-b838-c564ca1cc9b8.png
People will thumbs up anything that claims to make performance faster, that doesn't mean that many people individually verified it. |
Now if I land this and a benchmark regresses (which It might), then I at least have something to investigate. |
@jonahwilliams would you be able to run through the manual test @luckysmg reproduced this with on a high fps device and confirm this doesn't seriously regress hitching? I'm not sure if there is a benchmark test that would fail, but it was really obvious irl with manual testing.
Since the egregious color hack essentially "fixed" the performance issues without app devs needing to do anything, is there something more explicit we can do that doesn't require app devs needing to know they should set the opaque property? Can we default it to something with similar performance characteristics? |
I think it was just scrolling a list view on a Pro device like this? Additional data, here's an internal bug that reported performance improving when the color hack rolled in b/263817100#comment17 |
What are the next steps here? Do we need a reproduce this on devices we have? Perhaps @jmagman and @jonahwilliams should chat? |
I think this change is valid as is and I'm waiting for actionable feedback. |
I started trying to reproduce this to see if I can profile a simple scrolling list clearly with and without the color hack, but I was hitting the dreaded Once I get this working: What do you think, @jonahwilliams? |
SGTM! |
Any updates? |
Yes, I have the repro case running at home, but I left my promotion display phone at work and I wanted to test at a higher frame rate. I already have a note to myself to bring it home next time I'm in the office. |
@jonahwilliams has a high-framerate device and can confirm this patch makes no difference to performance. We would like to move ahead with this unless there are any objections. |
Sounds good, let's land it then and see how the benchmarks move. I had bought a new iPhone 16 Pro that came on Friday to test but I hadn't had a change to profile. Thanks for testing it, Jonah! |
This needs an approval to land. |
Sorry, done. |
Thanks! |
…155738) flutter/engine@3719454...fc6c852 2024-09-26 [email protected] [iOS] remove clear color hack. (flutter/engine#54451) 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
…lutter#155738) flutter/engine@3719454...fc6c852 2024-09-26 [email protected] [iOS] remove clear color hack. (flutter/engine#54451) 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
…lutter#155738) flutter/engine@3719454...fc6c852 2024-09-26 [email protected] [iOS] remove clear color hack. (flutter/engine#54451) 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
…lutter#155738) flutter/engine@3719454...fc6c852 2024-09-26 [email protected] [iOS] remove clear color hack. (flutter/engine#54451) 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
…lutter#155738) flutter/engine@3719454...fc6c852 2024-09-26 [email protected] [iOS] remove clear color hack. (flutter/engine#54451) 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
Fixes flutter/flutter#125640
This doesn't actually do anything, instead it forces opaque to false. If developers want opaque to be false, they can just set it directly.