Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Impeller] Pack impeller:Path into 2 vecs instead of 3. (#55028)
This better aligns impeller::Path with how Skia::Path works, and probably gives us a route to a faster Skia path to Impeller::Path conversion (since dart:ui Path will be a Skia path for a long time). We used 3 vectors to separately store: 1. Path points 2. Path Verbs 3. Path contours (index lookups for contour starts). This gave us almost O(1) access for path points based on the verb. However, we don't ever actually use the lookup except for in tests. In all real scenarios we iterate through all path verbs, which means this iterators can simply increment the offset into the path points array. Finally, we can store the contour information in the path points array as well by representing the bool is_closed with another Point value :) (for easier alignment).
- Loading branch information