-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[path_parsing] Initial import #7908
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
[path_parsing] Initial import #7908
Conversation
* Improve path_parsing performance. This code: * Avoiding String.codeUnits. * Reduces lookups to String.codeUnitAt * Caches _length * Builds integer value in a single pass. String.codeUnits on both JS and VM returns a forwarding CodeUnits class defined here, so all lookups to codeUnits[index] actually go through an extra layer of dispatch. Combined, all of these changes improve the parsing speed by ~25% when measured with real SVG path data. parseSvgPathData() timing, measured on a Nexus 2 downclocked to 1GHz. Before: Run1: 76,124,392 us Run2: 75,103,426 us Run3: 75,481,128 us After: Run1: 59,319,622 us Run2: 58,435,315 us Run3: 58,478,007 us * analysis cleanup Co-authored-by: Dan Field <[email protected]>
* Use radians when rotating matrix * less precision in tests
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@zanderso Would you like to edit the README to add a note? Also, currently we use CODEOWNERS in this repo; who should I list for this and the follow-up packages? |
|
Yes, I'll edit the README. Working on the text, but I think this PR doesn't need to block on it? A while back, @domesticmouse volunteered to be the owner for these for the purposes of mechanical updates with more involved issues in |
|
|
||
| Split from the Flutter path drawing library to create a pure Dart parsing | ||
| library for SVG paths and code generation (without dependencies on Flutter | ||
| runtime). No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Add trailing EOL at EOF
flutter/packages@a556f0f...e0c4f55 2024-10-25 [email protected] [path_parsing] Initial import (flutter/packages#7908) 2024-10-24 [email protected] [video_player] Simplify Pigeon API on Android (flutter/packages#7909) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Imports https://github.com/dnfield/dart_path_parsing into this repository, with history, and updates it to follow repository conventions: