Keep Path state in sync with external SkPath edits#2902
Merged
Ivan Matkov (MatkovIvan) merged 1 commit intoMar 24, 2026
Conversation
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.
f0bb706 to
b1433dc
Compare
Igor Demin (igordmn)
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 underlyingSkPathcould get out of sync with cached wrapper state inSkiaBackedPath.This change keeps
SkiaBackedPathsynchronized with external/nativeSkPathmutations and preserves stableSkPathidentity. It also adds a focused regression test covering reusedgetSegment()destinations.Release Notes
Fixes - Multiple Platforms
PathMeasure.getSegment(..., startWithMoveTo = true)could produce incorrect results when reusing destination paths