Skip to content

Track damage rect and only draw inside it #33939

@liyuqian

Description

@liyuqian

Currently, Flutter redraws every pixel even if there's a very tiny part of the screen that's animating (e.g., CircularProgressIndicator, caret in TextField).

We should compute the damage rect (which shouldn't be hard due to our repaint mechanism), reuse the buffer from previous frames, and draw the new frame with the clip set to the damage rect.

Hopefully this could have a significant impact on CPU/GPU usages for issues like #31865

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: dream (g3)engineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions