Skip to content

[Impeller] Use CanvasSpy or DlOpSpy in more embedders #125318

@jonahwilliams

Description

@jonahwilliams

When rendering platform views, Flutter will break the scene up into N layers and render these to different surfaces, using combinations of clear and clips. Generally, if there is nothing either over a platform view or under it, one or more of these layers is likely to be "trivial", that is result in no drawing at all.

Nevertheless, we will still go through a lot of work to process this layer, wait on the drawable, queue up clip commands that do nothing, et cetera. Though this doesn't really hurt GPU utilization, it does hurt overall raster time.

We should be able to detect these cases, and shortcircuit more of the workload. Rather than just making the engine better at detecting difference clips, this is a feature request for the display list to be able to determine that it doesn't actually render anything. That way we can stop before we even dispatch to impeller or attempt to acquire the drawable.

For example:

This second render pass contains only clips and a solid fill that gets clipped out. The resulting texture is entirely transparent.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.r: solvedIssue is closed as solvedteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions