Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clone metrics path when a path is added
When multiple strokes are added to the same path with trim path applied to them, and some are affected by transform, and some aren't, there's contention between the localPath and worldPath metrics. This PR solves it by storing a unique metrics path per instance added. It copies the values from the original path so they aren't calculated more than needed. There was the same contention with follow paths and trim paths, and it was solved in a slightly similar way, but there might be ramifications I'm missing from this approach. NOTE: it also addresses this [TODO](https://github.com/rive-app/rive/blob/master/packages/runtime/src/shapes/metrics_path.cpp#L72), which ended up not being needed for this fix but left it since there was a TODO for it. I can remove it if it makes things more clear. Diffs= b58df4ba7 clone metrics path when a path is added (#6394)
- Loading branch information