Skip to content

[Impeller] Avoid allocating path for dashed lines #169881

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

Merged
merged 4 commits into from
Jun 9, 2025

Conversation

flar
Copy link
Contributor

@flar flar commented Jun 2, 2025

We use the new algorithmically generated PathSource mechanism for generating dashed lines to avoid allocating a growable path object.

@github-actions github-actions bot added engine flutter/engine repository. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jun 2, 2025
@flar
Copy link
Contributor Author

flar commented Jun 2, 2025

Dashed lines aren't used often, but the code was easy to transfer into a source object from the path creation code, leaving us with a net negligible amount of code to deal more effectively with this case. The idea is to never generate a path if we don't need to - we're almost there...

@flar flar requested review from jonahwilliams and gaaclarke June 3, 2025 00:16
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chinmaygarde
Copy link
Member

@flar May I land this?

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2025
@flar
Copy link
Contributor Author

flar commented Jun 9, 2025

I must have missed the approval when it happened last week...

@auto-submit auto-submit bot added this pull request to the merge queue Jun 9, 2025
Merged via the queue into flutter:master with commit b9e7ba3 Jun 9, 2025
182 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e: impeller Impeller rendering backend issues and features requests engine flutter/engine repository. See also e: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants