Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] immediately encode geometry data to host buffer when dispatching. #147121

Closed
jonahwilliams opened this issue Apr 20, 2024 · 3 comments
Closed
Labels
e: impeller Impeller rendering backend issues and features requests team-engine Owned by Engine team

Comments

@jonahwilliams
Copy link
Member

Currently impeller will create abstract geometry entries, one per draw call. These must be heap allocated and contributes to the abundance of shared ptrs per draw.

Previously we delayed encoding of the geometry data because we needed to know the final color source to determine if UVs should be computed. With flutter/engine#52106 landed, we don't actually need to compute UVs on the CPU ever. Thus, we can assume we're just uploading vertex data and can do so eagerly.

The geometry interface becomes a struct that holds a vertex buffer and some other auxiliary information. The static Geometry::MakeRect/MakeFilledPath et cetera just perform the computation that was previously performed in Geometry::GetPositionData.

@jonahwilliams jonahwilliams added e: impeller Impeller rendering backend issues and features requests team-engine Owned by Engine team labels Apr 20, 2024
@jonahwilliams
Copy link
Member Author

Part of #142054 , though not dependent since this change can be done with either canvas approach.

@jonahwilliams
Copy link
Member Author

This actually doesn't work because the aiks canvas does not have access to the HostBuffer.

Copy link

github-actions bot commented May 6, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: impeller Impeller rendering backend issues and features requests team-engine Owned by Engine team
Projects
None yet
Development

No branches or pull requests

1 participant