Skip to content

[Impeller] Reduce overhead of rectangle and oval drawing with a shape buffer. #116165

Closed

Description

@bdero

With http://flutter.dev/go/impeller-geometry under way, we can create specialized geometry factories and avoid using libtess for common shapes. But we can reduce overhead even further by uploading one immutable device buffer containing triangle strip vertex data for a simple square and a few circle LODs, which lasts for the lifetime of the Impeller Entities context.
Since the geometry factories are also responsible for producing the vertex transform for the geometry, this would allow us to avoid generating/uploading any vertex data for all rectangles and ovals.

At the moment, this is only feasible when generating the Position-only buffer, but the impact of this can expand to include PositionColor and PositionUV cases once we have a solution for customizing vertex layouts at runtime (as sourcing attributes from multiple distinct buffers simultaneously is allowed on all backends).

Activity

  1. added
    e: impellerImpeller rendering backend issues and features requests
    on Nov 29, 2022
  2. self-assigned this
    on Nov 29, 2022
  3. moved this to 🤔 Needs Triage in Impelleron Nov 29, 2022
  4. added
    c: proposalA detailed proposal for a change to Flutter
    engineflutter/engine related. See also e: labels.
    P2Important issues not at the top of the work list
    on Nov 29, 2022
  5. removed their assignment
    on Nov 29, 2022
  6. moved this from 🤔 Needs Triage to ⚡ Performance in Impelleron Dec 2, 2022
  7. jonahwilliams commented on May 20, 2024

    @jonahwilliams
    Contributor

    I think we've pretty well slimmed down the cost of drawing most primitives today. I don't think we need shape buffers for common cases, but we can always explore this in the future.

  8. github-actions commented on Jun 3, 2024

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

  9. locked as resolved and limited conversation to collaborators on Jun 3, 2024
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: proposalA detailed proposal for a change to Fluttere: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions