Skip to content

ClipRectLayer uses clip rect for saveLayer bounds #102341

@flar

Description

@flar

ClipRRectLayer (the round rect version) and ClipPathLayer both use the content bounds for the bounds of the saveLayer when the antiAliasWithSaveLayer flag is used, but ClipRectLayer uses its own clip rect. See:

The clip rect is likely smaller than the bounds of the children, but it doesn't have to be so the saveLayer may be larger than necessary.

All of these layers execute the saveLayer after they set the clip so the resulting saveLayer bounds should end up being the intersection of the clip with the bounds used in the saveLayer (this should be verified), so using the content bounds in the saveLayer should not waste memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.waiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions