Skip to content

More layer types should implement OffsetLayer #101990

Description

@jonahwilliams

In the investigation of #101941 / #101952 I've found that we'll be limited in how many addition layer / render object types we can support as repaint boundaries. It is expected that a repaint boundaries layer can accept an offset, but so far only OffsetLayer, TransformLayer, and OpacityLayer meet that criteria.

If its feasible, we should consider making more layer types support accepting an offset so we can expand the support.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    P3Issues that are less important to the Flutter project
    on Apr 15, 2022
  2. jonahwilliams commented on Apr 15, 2022

    @jonahwilliams
    ContributorAuthor

    Maybe we should also consider loosening this constraint too. For example, the ImageFilterLayer can't accept an offset directly, but it can include it in the matrix transform. As long as the offset can be consumed there shouldn't be a problem

  3. jonahwilliams commented on Apr 17, 2022

    @jonahwilliams
    ContributorAuthor

    As long as the offset can be consumed there shouldn't be a problem

    But from more research, its just way easier if we can set the offset directly. Then we let the framework do it and we can skip conditionally passing the offset into updateCompositedLayer

  4. dnfield commented on Apr 26, 2022

    @dnfield
    Contributor

    If ImageFitlererLayer wants to work with a transform we could just have the Offset be a getter that reports the translate of the matrix and a setter that update the translate, right?

  5. jonahwilliams commented on Apr 26, 2022

    @jonahwilliams
    ContributorAuthor

    I tried that and it didn't quite work because the filters are opaque. Also TBH it was a huge pain trying to make the repaint boundary code generic beyond OffsetLayer - since the framework wants to manage the offset itself

  6. github-actions commented on Apr 28, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: performanceRelates to speed or footprint issues (see "perf:" labels)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