@@ -77,9 +77,10 @@ def test_allow_open_contour(self):
7777 pen .curveTo ((2 , 2 ), (3 , 3 ), (4 , 4 ))
7878 pen .endPath ()
7979
80+ # In Skia m143+, consecutive moveTo operations collapse:
81+ # the second moveTo overwrites the first, so the single-point
82+ # contour at (0, 0) is lost
8083 assert list (path .segments ) == [
81- ('moveTo' , ((0.0 , 0.0 ),)),
82- ('endPath' , ()),
8384 ('moveTo' , ((1.0 , 0.0 ),)),
8485 ('lineTo' , ((1.0 , 1.0 ),)),
8586 ('curveTo' , ((2.0 , 2.0 ), (3.0 , 3.0 ), (4.0 , 4.0 ))),
@@ -367,23 +368,11 @@ def test_resolve(self):
367368 builder .add (path2 , PathOp .UNION )
368369 result = builder .resolve ()
369370
371+ # In Skia m143+, the PathOps simplification is more aggressive:
372+ # the pathological input (path2 with extreme spike at 773669888 units)
373+ # produces degenerate artifacts that are now simplified away,
374+ # leaving only the main contour
370375 assert list (result .segments ) == [
371- ("moveTo" , ((5316.0 , 4590.0 ),)),
372- ("lineTo" , ((5220.0 , 4590.0 ),)),
373- ("lineTo" , ((5220.0 , 4866.92333984375 ),)),
374- ("lineTo" , ((5316.0 , 4590.0 ),)),
375- ("closePath" , ()),
376- ("moveTo" , ((5192.18701171875 , 4947.15283203125 ),)),
377- (
378- "curveTo" ,
379- (
380- (5171.5654296875 , 4973.322265625 ),
381- (5160.0 , 5005.9443359375 ),
382- (5160.0 , 5040.00048828125 ),
383- ),
384- ),
385- ("lineTo" , ((5192.18701171875 , 4947.15283203125 ),)),
386- ("closePath" , ()),
387376 ("moveTo" , ((5688.0 , 7425.0 ),)),
388377 ("lineTo" , ((- 225.0 , 7425.0 ),)),
389378 ("lineTo" , ((5.0 , - 225.0 ),)),
@@ -548,9 +537,9 @@ def test_resolve(self):
548537 [
549538 (PathVerb .MOVE , ((0 , 0 ),)),
550539 ],
551- [
552- ( PathVerb . MOVE , (( 0 , 0 ),)),
553- ],
540+ # In Skia m143+, SkPathIter strips trailing moveTo verbs,
541+ # so a path with only moveTo becomes empty after reversal
542+ [ ],
554543 ),
555544 (
556545 [
0 commit comments