Skip to content

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

@bdero

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

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