-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
We previously added RTree culling to DisplayList to fix some noticeable performance issues with an app that drew a huge custom picture and relied on the engine to cull it down to just the part visible on the screen. That app was performing well after that work was completed.
Recently it had a massive regression due to an issue with the way we transfer bounds from one DisplayList to another when recording DLs into DLs. That scenario didn't use to happen, but became a common code path when Impeller started rendering the tree as one big DisplayList with the DisplayListLayers appearing as children of it. It also happens when there is an embedder and we render the parts of the tree above, below, and between each platform view into a DisplayList.
A benchmark is being created to track this performance to prevent future regressions in #133434
The fix is simple - when a DisplayList is being recorded and a DrawDisplayList call is made into it, use the culling rect of the parent DL to control the bounds transfer from the RTree of the child (see https://github.com/flutter/engine/blob/d89824ab018f1718e5f54e840a816f3e4634e387/display_list/dl_canvas_to_receiver.cc#L776)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status