-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Description
When calling reset on a CkPath, the backing SkPath FillType is reset to kWinding_FillType:
When Flutter's CanvasKit Path.reset calls the backing SkPath's reset, it does not reset its own cached fillType:
https://github.com/flutter/engine/blob/b4fb5bb8be167d4f923ee6b760b5c076cbecf308/lib/web_ui/lib/src/engine/canvaskit/path.dart#L260
This results in the cached _fillType being incorrect and any attempt to set it may incorrectly early out thinking the backing path is synced:
https://github.com/flutter/engine/blob/b4fb5bb8be167d4f923ee6b760b5c076cbecf308/lib/web_ui/lib/src/engine/canvaskit/path.dart#L33-L35
We're seeing this in Rive where we call Path.reset on a path with evenOdd fill rule. The CkPath will think the rule is still set to evenOdd, but the backing SkPath has been reset to nonZero (kWinding_FillType).