Skip to content

[Cupertino] ListWheelViewport opacity optimizations. #124703

@jonahwilliams

Description

@jonahwilliams

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.

#124658
#121476

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: performanceRelates to speed or footprint issues (see "perf:" labels)f: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions