You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the cupertino picker will wrap built items in opacity as they scroll offscreen. When applied to text, this can be quite inefficient as we need to create additional offscreen surfaces to perform the opacity op. While the engine (both Skia and Impeller) does have a form of opacity optimization, its generally hard to apply to text.
Instead, I believe the cupertino picker's item builder callback should expose the current opacity. This would allow the caller to determine if they wanted to apply an opacity saveLayer or to directly apply the opacity to the paint color of the items. For text this would usually be correct and lead to substantially better performance.
changed the title [-][cupertino] CupertinoPicker component should allow items to apply opacity directly[/-][+][Cupertino] ListWheelViewport opacity optimizations.[/+]on Apr 12, 2023
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.
Activity
jonahwilliams commentedon Apr 12, 2023
It looks like this configuration goes all the way down to the ListWheelViewport, so unfortunately it looks like quite an intrusive change.
jonahwilliams commentedon Apr 12, 2023
Another way to fix this would be to render all offscreen items with a single opacity layer instead of per-item
jonahwilliams commentedon Apr 12, 2023
I have a working prototype that lifts up the opacity.
[-][cupertino] CupertinoPicker component should allow items to apply opacity directly[/-][+][Cupertino] ListWheelViewport opacity optimizations.[/+][cupertino] improve cupertino picker performance by using at most one…
[cupertino] improve cupertino picker performance by using at most one…
github-actions commentedon Apr 29, 2023
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 -vand a minimal reproduction of the issue.