Skip to content

[DisplayList] internal_nodes_canvas prevents full conversion of engine layers to a DisplayList interface #109576

@flar

Description

@flar

We've been slowly introducing optional code into the engine layers to render their output directly to a DisplayListBuilder so that we can maintain our current code base which is largely speaking to the SkCanvas API and also speak directly to the DisplayList interface in cases where calling through an SkCanvas call might lose information(*).

Unfortunately, we've started running into a common case where we use a saveLayer call on the internal_nodes_canvas object which broadcasts the saveLayer to a number of SkCanvas objects - typically one per embedded view in the PlatformView stack. In that case we must call saveLayer on the SkCanvas objects in order to broadcast the call as the optional leaf_nodes_builder object is only talking to the builder for the current embedding layer.

We either need to create an NWayBuilder type of object, or we need to completely switch over to DisplayListBuilder (or similar API) as our primary rendering API and have that speak to either Impeller or Skia in the back end.

(*) - mostly calls that involve an Sk...Filter object in the SkPaint object - many of those objects cannot be inspected well enough to store their parameters in a DisplayList that is being fed via an SkCanvas adapter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions