Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Refactor all tessellation calls to use builder callback, rename. #36706

Merged
merged 4 commits into from
Oct 19, 2022

Conversation

jonahwilliams
Copy link
Member

Libtess gives all tessellation results at once. The old callback approach had to re-duplicate and push to vectors in order to give one point at a time. Previously, I introduced a callback that provided all vertices and indices at once avoiding that extra copy. We should update all callsites to use this, and rename it to just Tessellate.

Note that not all of our geometry can take advantage of this as strongly as the basic solid fill geometry. We still have an extra copy that is required to go from VBB into Host Buffer that can't be elimiated until we have AoS style bindingy-stuff available. But note, this is still fewer allocations than the point callback

@jonahwilliams jonahwilliams requested a review from dnfield October 11, 2022 00:38
@chinmaygarde chinmaygarde changed the title [Impeller] refactor all tessellation calls to use builder callback, rename [Impeller] Refactor all tessellation calls to use builder callback, rename Oct 13, 2022
@chinmaygarde chinmaygarde changed the title [Impeller] Refactor all tessellation calls to use builder callback, rename [Impeller] Refactor all tessellation calls to use builder callback, rename. Oct 13, 2022
@dnfield
Copy link
Contributor

dnfield commented Oct 14, 2022

FWIW, if we do end up moving to the Lyon tessellator, it does offer an iterative per-vertex callback API, although I haven't dug into that to see whether it's just doing extra copies to achieve that.

That said, it shouldn't block this patch.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 19, 2022
@auto-submit auto-submit bot merged commit 213e294 into flutter:main Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants