Skip to content

Expand the raster cache to include DisplayList objects embedded in other DisplayList objects #87584

@flar

Description

@flar

This shortcoming was discovered during the analysis of flutter_svg performance.

Currently the raster cache is only applied by a PictureLayer in its Preroll and Paint methods. If a flutter app adds a (stable) Dart Picture object to a given frame using ui.Canvas.drawPicture(), then it will not be a candidate for the raster cache because the PictureLayer will only see the overall Picture that was being generated by that ui.Canvas.

With the new DisplayList format, we process these elements ourselves and definitely do see when a component DisplayList is rendered as part of another DisplayList. Unfortunately, the initial implementation of the DisplayList raster cache follows the same pattern used in PictureLayer for SkPicture objects and the caching is only considered in the DisplayListLayer Preroll and Paint methods. Since we process the results of DisplayList.drawDisplayList ourselves, we could try to raster cache those component DisplayList objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectengineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions