Skip to content

[Impeller] dl dispatch culling still depends on canvas computed cull rects. #155133

@jonahwilliams

Description

@jonahwilliams

In investigating #155104 I discovered that there is a performance regression on an application with a large amount of text. Most of this text is offscreen but contains unique glyphs. The regression is caused by us populating the glyph atlas with these unique glyphs even though they should be culled offscreen.

Some debug printing reveals that we are only rendering ~36 text frames but processing the unique glyphs of 286 text frames.

The rendering dispatcher is actually feeding the impeller cull rect back into the display list in DLDispatcher::drawDisplayList:

https://github.com/flutter/engine/blob/main/impeller/display_list/dl_dispatcher.cc#L1209-L1225

Whereas the text frame dispatcher (which collects glyphs) doesn't do so as it doesn't have that computed yet.

I don't think display list should need to rely on the impeller canvas cull rect - as this cull rect is ultimately derived directly from the information that dl provides. Can we handle nested DL dispatching automatically by plumbing through the correctly transformed cull rect?

FYI @flar

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions