Skip to content

Keep Path state in sync with external SkPath edits#2902

Merged
Ivan Matkov (MatkovIvan) merged 1 commit into
jb-mainfrom
ivan.matkov/fix-path-external-edit
Mar 24, 2026
Merged

Keep Path state in sync with external SkPath edits#2902
Ivan Matkov (MatkovIvan) merged 1 commit into
jb-mainfrom
ivan.matkov/fix-path-external-edit

Conversation

@MatkovIvan

Copy link
Copy Markdown
Collaborator

Fixes CMP-9969 UI glitch when animating path (CMP 1.11.0-alpha04)

PathMeasure.getSegment(..., startWithMoveTo = true) could produce an incorrect segment on reused destination paths because native writes to the underlying SkPath could get out of sync with cached wrapper state in SkiaBackedPath.
This change keeps SkiaBackedPath synchronized with external/native SkPath mutations and preserves stable SkPath identity. It also adds a focused regression test covering reused getSegment() destinations.

Release Notes

Fixes - Multiple Platforms

  • (prerelease fix) Fixed a path regression where PathMeasure.getSegment(..., startWithMoveTo = true) could produce incorrect results when reusing destination paths

@MatkovIvan Ivan Matkov (MatkovIvan) marked this pull request as draft March 23, 2026 12:26
Preserve the same SkPath instance when applying PathBuilder snapshots and rebuild the cached PathBuilder when the backing SkPath changes externally. This fixes PathMeasure.getSegment(..., startWithMoveTo = true) with a reused destination path after the Skia m144 migration.

Add a focused skiko regression test covering reused getSegment destinations.
@MatkovIvan Ivan Matkov (MatkovIvan) force-pushed the ivan.matkov/fix-path-external-edit branch from f0bb706 to b1433dc Compare March 23, 2026 13:57
@MatkovIvan Ivan Matkov (MatkovIvan) marked this pull request as ready for review March 23, 2026 13:58
@MatkovIvan Ivan Matkov (MatkovIvan) merged commit 7408ece into jb-main Mar 24, 2026
17 checks passed
@MatkovIvan Ivan Matkov (MatkovIvan) deleted the ivan.matkov/fix-path-external-edit branch March 24, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants