Skip to content

Flow should optimize away render target switches when the same effect can be achieved via paint options. #9480

Closed

Description

@chinmaygarde

Render target switches caused by SkCanvas::saveLayer are expensive on lower end devices. These are typically introduced by flow when there is an opacity layer or clip. However, there are many cases where only a single item (such as an image at a custom opacity) is rendered in this target. In such cases, the paint options (such as one expressing the opacity of the image) can be used to achieve the same effect.

flow should look for such optimizations.

Activity

  1. added
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    on Jan 3, 2018
  2. added this to the milestone on Jan 3, 2018
  3. modified the milestones: , on Mar 3, 2020
  4. added
    perf: speedPerformance issues related to (mostly rendering) speed
    on Mar 3, 2020
  5. Hixie commented on Mar 3, 2020

    @Hixie
    Contributor

    cc @liyuqian @chinmaygarde is this still relevant?

  6. chinmaygarde commented on Mar 3, 2020

    @chinmaygarde
    ContributorAuthor

    While there has been progress made on eliding render target switches introduced by the engine itself, there is a lot more to be done on this front. Currently, the opaqueness of the SkPicture presented to the engine hinders its capability to determine if the operation is a group opacity. We should be be able to affect such optimizations once we move to our picture format. Till then, this issue should be kept open.

  7. liyuqian commented on Mar 4, 2020

    @liyuqian
    Contributor

    @chinmaygarde : is there an issue that tracks the creation of our own picture format? The last news I knew is that Skia sent us a link to SkLiteDL.h

  8. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  9. removed this from the milestone on Jun 2, 2020
  10. removed this from the milestone on Jun 2, 2020
  11. removed this from the milestone on Aug 17, 2020
  12. dnfield commented on Nov 8, 2021

    @dnfield
    Contributor

    Deduping this against #92874 which is more up to date now

  13. github-actions commented on Nov 22, 2021

    @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.

  14. locked as resolved and limited conversation to collaborators on Nov 22, 2021
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

    P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions