2 * Copyright 2012 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
7 #include "PathOpsExtendedTest.h"
9 #define TEST(name) { name, #name }
11 static void testLine1(skiatest::Reporter* reporter, const char* filename) {
17 testSimplify(reporter, path, filename);
20 static void testLine1x(skiatest::Reporter* reporter, const char* filename) {
22 path.setFillType(SkPath::kEvenOdd_FillType);
27 testSimplify(reporter, path, filename);
30 static void addInnerCWTriangle(SkPath& path) {
37 static void addInnerCCWTriangle(SkPath& path) {
44 static void addOuterCWTriangle(SkPath& path) {
51 static void addOuterCCWTriangle(SkPath& path) {
58 static void testLine2(skiatest::Reporter* reporter, const char* filename) {
60 addInnerCWTriangle(path);
61 addOuterCWTriangle(path);
62 testSimplify(reporter, path, filename);
65 static void testLine2x(skiatest::Reporter* reporter, const char* filename) {
67 path.setFillType(SkPath::kEvenOdd_FillType);
68 addInnerCWTriangle(path);
69 addOuterCWTriangle(path);
70 testSimplify(reporter, path, filename);
73 static void testLine3(skiatest::Reporter* reporter, const char* filename) {
75 addInnerCCWTriangle(path);
76 addOuterCWTriangle(path);
77 testSimplify(reporter, path, filename);
80 static void testLine3x(skiatest::Reporter* reporter, const char* filename) {
82 path.setFillType(SkPath::kEvenOdd_FillType);
83 addInnerCCWTriangle(path);
84 addOuterCWTriangle(path);
85 testSimplify(reporter, path, filename);
88 static void testLine3a(skiatest::Reporter* reporter, const char* filename) {
90 addInnerCWTriangle(path);
91 addOuterCCWTriangle(path);
92 testSimplify(reporter, path, filename);
95 static void testLine3ax(skiatest::Reporter* reporter, const char* filename) {
97 path.setFillType(SkPath::kEvenOdd_FillType);
98 addInnerCWTriangle(path);
99 addOuterCCWTriangle(path);
100 testSimplify(reporter, path, filename);
103 static void testLine3b(skiatest::Reporter* reporter, const char* filename) {
105 addInnerCCWTriangle(path);
106 addOuterCCWTriangle(path);
107 testSimplify(reporter, path, filename);
110 static void testLine3bx(skiatest::Reporter* reporter, const char* filename) {
112 path.setFillType(SkPath::kEvenOdd_FillType);
113 addInnerCCWTriangle(path);
114 addOuterCCWTriangle(path);
115 testSimplify(reporter, path, filename);
118 static void testLine4(skiatest::Reporter* reporter, const char* filename) {
120 addOuterCCWTriangle(path);
121 addOuterCWTriangle(path);
122 testSimplify(reporter, path, filename);
125 static void testLine4x(skiatest::Reporter* reporter, const char* filename) {
127 path.setFillType(SkPath::kEvenOdd_FillType);
128 addOuterCCWTriangle(path);
129 addOuterCWTriangle(path);
130 testSimplify(reporter, path, filename);
133 static void testLine5(skiatest::Reporter* reporter, const char* filename) {
135 addOuterCWTriangle(path);
136 addOuterCWTriangle(path);
137 testSimplify(reporter, path, filename);
140 static void testLine5x(skiatest::Reporter* reporter, const char* filename) {
142 path.setFillType(SkPath::kEvenOdd_FillType);
143 addOuterCWTriangle(path);
144 addOuterCWTriangle(path);
145 testSimplify(reporter, path, filename);
148 static void testLine6(skiatest::Reporter* reporter, const char* filename) {
158 testSimplify(reporter, path, filename);
161 static void testLine6x(skiatest::Reporter* reporter, const char* filename) {
163 path.setFillType(SkPath::kEvenOdd_FillType);
172 testSimplify(reporter, path, filename);
175 static void testLine7(skiatest::Reporter* reporter, const char* filename) {
185 testSimplify(reporter, path, filename);
188 static void testLine7x(skiatest::Reporter* reporter, const char* filename) {
190 path.setFillType(SkPath::kEvenOdd_FillType);
199 testSimplify(reporter, path, filename);
202 static void testLine7a(skiatest::Reporter* reporter, const char* filename) {
208 testSimplify(reporter, path, filename);
211 static void testLine7ax(skiatest::Reporter* reporter, const char* filename) {
213 path.setFillType(SkPath::kEvenOdd_FillType);
218 testSimplify(reporter, path, filename);
221 static void testLine7b(skiatest::Reporter* reporter, const char* filename) {
230 testSimplify(reporter, path, filename);
233 static void testLine7bx(skiatest::Reporter* reporter, const char* filename) {
235 path.setFillType(SkPath::kEvenOdd_FillType);
243 testSimplify(reporter, path, filename);
246 static void testLine8(skiatest::Reporter* reporter, const char* filename) {
256 testSimplify(reporter, path, filename);
259 static void testLine8x(skiatest::Reporter* reporter, const char* filename) {
261 path.setFillType(SkPath::kEvenOdd_FillType);
270 testSimplify(reporter, path, filename);
273 static void testLine9(skiatest::Reporter* reporter, const char* filename) {
283 testSimplify(reporter, path, filename);
286 static void testLine9x(skiatest::Reporter* reporter, const char* filename) {
288 path.setFillType(SkPath::kEvenOdd_FillType);
297 testSimplify(reporter, path, filename);
300 static void testLine10(skiatest::Reporter* reporter, const char* filename) {
310 testSimplify(reporter, path, filename);
313 static void testLine10x(skiatest::Reporter* reporter, const char* filename) {
315 path.setFillType(SkPath::kEvenOdd_FillType);
324 testSimplify(reporter, path, filename);
327 static void testLine10a(skiatest::Reporter* reporter, const char* filename) {
337 testSimplify(reporter, path, filename);
340 static void testLine10ax(skiatest::Reporter* reporter, const char* filename) {
342 path.setFillType(SkPath::kEvenOdd_FillType);
351 testSimplify(reporter, path, filename);
354 static void addCWContainer(SkPath& path) {
361 static void addCCWContainer(SkPath& path) {
368 static void addCWContents(SkPath& path) {
375 static void addCCWContents(SkPath& path) {
382 static void testLine11(skiatest::Reporter* reporter, const char* filename) {
384 addCWContainer(path);
386 testSimplify(reporter, path, filename);
389 static void testLine11x(skiatest::Reporter* reporter, const char* filename) {
391 path.setFillType(SkPath::kEvenOdd_FillType);
392 addCWContainer(path);
394 testSimplify(reporter, path, filename);
397 static void testLine12(skiatest::Reporter* reporter, const char* filename) {
399 addCCWContainer(path);
401 testSimplify(reporter, path, filename);
404 static void testLine12x(skiatest::Reporter* reporter, const char* filename) {
406 path.setFillType(SkPath::kEvenOdd_FillType);
407 addCCWContainer(path);
409 testSimplify(reporter, path, filename);
412 static void testLine13(skiatest::Reporter* reporter, const char* filename) {
414 addCWContainer(path);
415 addCCWContents(path);
416 testSimplify(reporter, path, filename);
419 static void testLine13x(skiatest::Reporter* reporter, const char* filename) {
421 path.setFillType(SkPath::kEvenOdd_FillType);
422 addCWContainer(path);
423 addCCWContents(path);
424 testSimplify(reporter, path, filename);
427 static void testLine14(skiatest::Reporter* reporter, const char* filename) {
429 addCCWContainer(path);
430 addCCWContents(path);
431 testSimplify(reporter, path, filename);
434 static void testLine14x(skiatest::Reporter* reporter, const char* filename) {
436 path.setFillType(SkPath::kEvenOdd_FillType);
437 addCCWContainer(path);
438 addCCWContents(path);
439 testSimplify(reporter, path, filename);
442 static void testLine15(skiatest::Reporter* reporter, const char* filename) {
444 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
445 testSimplify(reporter, path, filename);
448 static void testLine15x(skiatest::Reporter* reporter, const char* filename) {
450 path.setFillType(SkPath::kEvenOdd_FillType);
451 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
452 testSimplify(reporter, path, filename);
455 static void testLine16(skiatest::Reporter* reporter, const char* filename) {
457 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
458 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
459 testSimplify(reporter, path, filename);
462 static void testLine16x(skiatest::Reporter* reporter, const char* filename) {
464 path.setFillType(SkPath::kEvenOdd_FillType);
465 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
466 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
467 testSimplify(reporter, path, filename);
470 static void testLine17(skiatest::Reporter* reporter, const char* filename) {
472 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
473 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
474 testSimplify(reporter, path, filename);
477 static void testLine17x(skiatest::Reporter* reporter, const char* filename) {
479 path.setFillType(SkPath::kEvenOdd_FillType);
480 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
481 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
482 testSimplify(reporter, path, filename);
485 static void testLine18(skiatest::Reporter* reporter, const char* filename) {
487 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
488 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
489 testSimplify(reporter, path, filename);
492 static void testLine18x(skiatest::Reporter* reporter, const char* filename) {
494 path.setFillType(SkPath::kEvenOdd_FillType);
495 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
496 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
497 testSimplify(reporter, path, filename);
500 static void testLine19(skiatest::Reporter* reporter, const char* filename) {
502 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
503 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
504 testSimplify(reporter, path, filename);
507 static void testLine19x(skiatest::Reporter* reporter, const char* filename) {
509 path.setFillType(SkPath::kEvenOdd_FillType);
510 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
511 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
512 testSimplify(reporter, path, filename);
515 static void testLine20(skiatest::Reporter* reporter, const char* filename) {
517 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
518 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
519 testSimplify(reporter, path, filename);
522 static void testLine20x(skiatest::Reporter* reporter, const char* filename) {
524 path.setFillType(SkPath::kEvenOdd_FillType);
525 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
526 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
527 testSimplify(reporter, path, filename);
530 static void testLine21(skiatest::Reporter* reporter, const char* filename) {
532 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
533 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
534 testSimplify(reporter, path, filename);
537 static void testLine21x(skiatest::Reporter* reporter, const char* filename) {
539 path.setFillType(SkPath::kEvenOdd_FillType);
540 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
541 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
542 testSimplify(reporter, path, filename);
545 static void testLine22(skiatest::Reporter* reporter, const char* filename) {
547 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
548 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
549 testSimplify(reporter, path, filename);
552 static void testLine22x(skiatest::Reporter* reporter, const char* filename) {
554 path.setFillType(SkPath::kEvenOdd_FillType);
555 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
556 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
557 testSimplify(reporter, path, filename);
560 static void testLine23(skiatest::Reporter* reporter, const char* filename) {
562 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
563 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
564 testSimplify(reporter, path, filename);
567 static void testLine23x(skiatest::Reporter* reporter, const char* filename) {
569 path.setFillType(SkPath::kEvenOdd_FillType);
570 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
571 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
572 testSimplify(reporter, path, filename);
575 static void testLine24a(skiatest::Reporter* reporter, const char* filename) {
585 testSimplify(reporter, path, filename);
588 static void testLine24ax(skiatest::Reporter* reporter, const char* filename) {
590 path.setFillType(SkPath::kEvenOdd_FillType);
599 testSimplify(reporter, path, filename);
602 static void testLine24(skiatest::Reporter* reporter, const char* filename) {
604 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
605 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
606 testSimplify(reporter, path, filename);
609 static void testLine24x(skiatest::Reporter* reporter, const char* filename) {
611 path.setFillType(SkPath::kEvenOdd_FillType);
612 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
613 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
614 testSimplify(reporter, path, filename);
617 static void testLine25(skiatest::Reporter* reporter, const char* filename) {
619 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
620 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
621 testSimplify(reporter, path, filename);
624 static void testLine25x(skiatest::Reporter* reporter, const char* filename) {
626 path.setFillType(SkPath::kEvenOdd_FillType);
627 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
628 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
629 testSimplify(reporter, path, filename);
632 static void testLine26(skiatest::Reporter* reporter, const char* filename) {
634 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
635 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
636 testSimplify(reporter, path, filename);
639 static void testLine26x(skiatest::Reporter* reporter, const char* filename) {
641 path.setFillType(SkPath::kEvenOdd_FillType);
642 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
643 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
644 testSimplify(reporter, path, filename);
647 static void testLine27(skiatest::Reporter* reporter, const char* filename) {
649 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
650 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
651 testSimplify(reporter, path, filename);
654 static void testLine27x(skiatest::Reporter* reporter, const char* filename) {
656 path.setFillType(SkPath::kEvenOdd_FillType);
657 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
658 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
659 testSimplify(reporter, path, filename);
662 static void testLine28(skiatest::Reporter* reporter, const char* filename) {
664 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
665 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
666 testSimplify(reporter, path, filename);
669 static void testLine28x(skiatest::Reporter* reporter, const char* filename) {
671 path.setFillType(SkPath::kEvenOdd_FillType);
672 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
673 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
674 testSimplify(reporter, path, filename);
677 static void testLine29(skiatest::Reporter* reporter, const char* filename) {
679 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
680 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
681 testSimplify(reporter, path, filename);
684 static void testLine29x(skiatest::Reporter* reporter, const char* filename) {
686 path.setFillType(SkPath::kEvenOdd_FillType);
687 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
688 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
689 testSimplify(reporter, path, filename);
692 static void testLine30(skiatest::Reporter* reporter, const char* filename) {
694 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
695 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
696 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
697 testSimplify(reporter, path, filename);
700 static void testLine30x(skiatest::Reporter* reporter, const char* filename) {
702 path.setFillType(SkPath::kEvenOdd_FillType);
703 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
704 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
705 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
706 testSimplify(reporter, path, filename);
709 static void testLine31(skiatest::Reporter* reporter, const char* filename) {
711 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
712 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
713 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
714 testSimplify(reporter, path, filename);
717 static void testLine31x(skiatest::Reporter* reporter, const char* filename) {
719 path.setFillType(SkPath::kEvenOdd_FillType);
720 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
721 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
722 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
723 testSimplify(reporter, path, filename);
726 static void testLine32(skiatest::Reporter* reporter, const char* filename) {
728 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
729 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
730 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
731 testSimplify(reporter, path, filename);
734 static void testLine32x(skiatest::Reporter* reporter, const char* filename) {
736 path.setFillType(SkPath::kEvenOdd_FillType);
737 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
738 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
739 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
740 testSimplify(reporter, path, filename);
743 static void testLine33(skiatest::Reporter* reporter, const char* filename) {
745 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
746 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
747 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
748 testSimplify(reporter, path, filename);
751 static void testLine33x(skiatest::Reporter* reporter, const char* filename) {
753 path.setFillType(SkPath::kEvenOdd_FillType);
754 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
755 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
756 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
757 testSimplify(reporter, path, filename);
760 static void testLine34(skiatest::Reporter* reporter, const char* filename) {
762 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
763 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
764 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
765 testSimplify(reporter, path, filename);
768 static void testLine34x(skiatest::Reporter* reporter, const char* filename) {
770 path.setFillType(SkPath::kEvenOdd_FillType);
771 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
772 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
773 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
774 testSimplify(reporter, path, filename);
777 static void testLine35(skiatest::Reporter* reporter, const char* filename) {
779 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
780 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
781 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
782 testSimplify(reporter, path, filename);
785 static void testLine35x(skiatest::Reporter* reporter, const char* filename) {
787 path.setFillType(SkPath::kEvenOdd_FillType);
788 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
789 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
790 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
791 testSimplify(reporter, path, filename);
794 static void testLine36(skiatest::Reporter* reporter, const char* filename) {
796 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
797 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
798 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
799 testSimplify(reporter, path, filename);
802 static void testLine36x(skiatest::Reporter* reporter, const char* filename) {
804 path.setFillType(SkPath::kEvenOdd_FillType);
805 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
806 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
807 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
808 testSimplify(reporter, path, filename);
811 static void testLine37(skiatest::Reporter* reporter, const char* filename) {
813 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
814 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
815 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
816 testSimplify(reporter, path, filename);
819 static void testLine37x(skiatest::Reporter* reporter, const char* filename) {
821 path.setFillType(SkPath::kEvenOdd_FillType);
822 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
823 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
824 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
825 testSimplify(reporter, path, filename);
828 static void testLine38(skiatest::Reporter* reporter, const char* filename) {
830 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
831 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
832 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
833 testSimplify(reporter, path, filename);
836 static void testLine38x(skiatest::Reporter* reporter, const char* filename) {
838 path.setFillType(SkPath::kEvenOdd_FillType);
839 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
840 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
841 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
842 testSimplify(reporter, path, filename);
845 static void testLine40(skiatest::Reporter* reporter, const char* filename) {
847 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
848 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
849 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
850 testSimplify(reporter, path, filename);
853 static void testLine40x(skiatest::Reporter* reporter, const char* filename) {
855 path.setFillType(SkPath::kEvenOdd_FillType);
856 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
857 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
858 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
859 testSimplify(reporter, path, filename);
862 static void testLine41(skiatest::Reporter* reporter, const char* filename) {
864 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
865 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
866 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
867 testSimplify(reporter, path, filename);
870 static void testLine41x(skiatest::Reporter* reporter, const char* filename) {
872 path.setFillType(SkPath::kEvenOdd_FillType);
873 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
874 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
875 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
876 testSimplify(reporter, path, filename);
879 static void testLine42(skiatest::Reporter* reporter, const char* filename) {
881 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
882 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
883 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
884 testSimplify(reporter, path, filename);
887 static void testLine42x(skiatest::Reporter* reporter, const char* filename) {
889 path.setFillType(SkPath::kEvenOdd_FillType);
890 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
891 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
892 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
893 testSimplify(reporter, path, filename);
896 static void testLine43(skiatest::Reporter* reporter, const char* filename) {
898 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
899 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
900 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
901 testSimplify(reporter, path, filename);
904 static void testLine43x(skiatest::Reporter* reporter, const char* filename) {
906 path.setFillType(SkPath::kEvenOdd_FillType);
907 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
908 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
909 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
910 testSimplify(reporter, path, filename);
913 static void testLine44(skiatest::Reporter* reporter, const char* filename) {
915 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
916 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
917 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
918 testSimplify(reporter, path, filename);
921 static void testLine44x(skiatest::Reporter* reporter, const char* filename) {
923 path.setFillType(SkPath::kEvenOdd_FillType);
924 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
925 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
926 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
927 testSimplify(reporter, path, filename);
930 static void testLine45(skiatest::Reporter* reporter, const char* filename) {
932 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
933 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
934 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
935 testSimplify(reporter, path, filename);
938 static void testLine45x(skiatest::Reporter* reporter, const char* filename) {
940 path.setFillType(SkPath::kEvenOdd_FillType);
941 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
942 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
943 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
944 testSimplify(reporter, path, filename);
947 static void testLine46(skiatest::Reporter* reporter, const char* filename) {
949 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
950 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
951 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
952 testSimplify(reporter, path, filename);
955 static void testLine46x(skiatest::Reporter* reporter, const char* filename) {
957 path.setFillType(SkPath::kEvenOdd_FillType);
958 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
959 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
960 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
961 testSimplify(reporter, path, filename);
964 static void testLine47(skiatest::Reporter* reporter, const char* filename) {
966 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
967 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
968 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
969 testSimplify(reporter, path, filename);
972 static void testLine47x(skiatest::Reporter* reporter, const char* filename) {
974 path.setFillType(SkPath::kEvenOdd_FillType);
975 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
976 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
977 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
978 testSimplify(reporter, path, filename);
981 static void testLine48(skiatest::Reporter* reporter, const char* filename) {
983 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
984 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
985 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
986 testSimplify(reporter, path, filename);
989 static void testLine48x(skiatest::Reporter* reporter, const char* filename) {
991 path.setFillType(SkPath::kEvenOdd_FillType);
992 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
993 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
994 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
995 testSimplify(reporter, path, filename);
998 static void testLine49(skiatest::Reporter* reporter, const char* filename) {
1000 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1001 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
1002 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
1003 testSimplify(reporter, path, filename);
1006 static void testLine49x(skiatest::Reporter* reporter, const char* filename) {
1008 path.setFillType(SkPath::kEvenOdd_FillType);
1009 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1010 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
1011 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
1012 testSimplify(reporter, path, filename);
1015 static void testLine50(skiatest::Reporter* reporter, const char* filename) {
1017 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1018 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1019 testSimplify(reporter, path, filename);
1022 static void testLine50x(skiatest::Reporter* reporter, const char* filename) {
1024 path.setFillType(SkPath::kEvenOdd_FillType);
1025 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1026 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1027 testSimplify(reporter, path, filename);
1030 static void testLine51(skiatest::Reporter* reporter, const char* filename) {
1032 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1033 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1034 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1035 testSimplify(reporter, path, filename);
1038 static void testLine51x(skiatest::Reporter* reporter, const char* filename) {
1040 path.setFillType(SkPath::kEvenOdd_FillType);
1041 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1042 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1043 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1044 testSimplify(reporter, path, filename);
1047 static void testLine52(skiatest::Reporter* reporter, const char* filename) {
1049 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1050 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1051 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1052 testSimplify(reporter, path, filename);
1055 static void testLine52x(skiatest::Reporter* reporter, const char* filename) {
1057 path.setFillType(SkPath::kEvenOdd_FillType);
1058 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1059 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1060 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1061 testSimplify(reporter, path, filename);
1064 static void testLine53(skiatest::Reporter* reporter, const char* filename) {
1066 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1067 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1068 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1069 testSimplify(reporter, path, filename);
1072 static void testLine53x(skiatest::Reporter* reporter, const char* filename) {
1074 path.setFillType(SkPath::kEvenOdd_FillType);
1075 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1076 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1077 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1078 testSimplify(reporter, path, filename);
1081 static void testLine54(skiatest::Reporter* reporter, const char* filename) {
1083 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1084 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
1085 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
1086 testSimplify(reporter, path, filename);
1089 static void testLine54x(skiatest::Reporter* reporter, const char* filename) {
1091 path.setFillType(SkPath::kEvenOdd_FillType);
1092 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1093 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
1094 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
1095 testSimplify(reporter, path, filename);
1098 static void testLine55(skiatest::Reporter* reporter, const char* filename) {
1100 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1101 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
1102 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1103 testSimplify(reporter, path, filename);
1106 static void testLine55x(skiatest::Reporter* reporter, const char* filename) {
1108 path.setFillType(SkPath::kEvenOdd_FillType);
1109 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1110 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
1111 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1112 testSimplify(reporter, path, filename);
1115 static void testLine56(skiatest::Reporter* reporter, const char* filename) {
1117 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1118 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
1119 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1120 testSimplify(reporter, path, filename);
1123 static void testLine56x(skiatest::Reporter* reporter, const char* filename) {
1125 path.setFillType(SkPath::kEvenOdd_FillType);
1126 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1127 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
1128 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1129 testSimplify(reporter, path, filename);
1132 static void testLine57(skiatest::Reporter* reporter, const char* filename) {
1134 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1135 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
1136 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1137 testSimplify(reporter, path, filename);
1140 static void testLine57x(skiatest::Reporter* reporter, const char* filename) {
1142 path.setFillType(SkPath::kEvenOdd_FillType);
1143 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1144 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
1145 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1146 testSimplify(reporter, path, filename);
1149 static void testLine58(skiatest::Reporter* reporter, const char* filename) {
1151 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1152 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
1153 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
1154 testSimplify(reporter, path, filename);
1157 static void testLine58x(skiatest::Reporter* reporter, const char* filename) {
1159 path.setFillType(SkPath::kEvenOdd_FillType);
1160 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1161 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
1162 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
1163 testSimplify(reporter, path, filename);
1166 static void testLine59(skiatest::Reporter* reporter, const char* filename) {
1168 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1169 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
1170 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1171 testSimplify(reporter, path, filename);
1174 static void testLine59x(skiatest::Reporter* reporter, const char* filename) {
1176 path.setFillType(SkPath::kEvenOdd_FillType);
1177 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1178 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
1179 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1180 testSimplify(reporter, path, filename);
1183 static void testLine60(skiatest::Reporter* reporter, const char* filename) {
1185 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1186 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
1187 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1188 testSimplify(reporter, path, filename);
1191 static void testLine60x(skiatest::Reporter* reporter, const char* filename) {
1193 path.setFillType(SkPath::kEvenOdd_FillType);
1194 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1195 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
1196 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1197 testSimplify(reporter, path, filename);
1200 static void testLine61(skiatest::Reporter* reporter, const char* filename) {
1202 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1203 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
1204 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1205 testSimplify(reporter, path, filename);
1208 static void testLine61x(skiatest::Reporter* reporter, const char* filename) {
1210 path.setFillType(SkPath::kEvenOdd_FillType);
1211 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1212 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
1213 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1214 testSimplify(reporter, path, filename);
1217 static void testLine62(skiatest::Reporter* reporter, const char* filename) {
1219 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1220 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1221 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1222 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1223 testSimplify(reporter, path, filename);
1226 static void testLine62x(skiatest::Reporter* reporter, const char* filename) {
1228 path.setFillType(SkPath::kEvenOdd_FillType);
1229 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1230 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1231 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1232 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1233 testSimplify(reporter, path, filename);
1236 static void testLine63(skiatest::Reporter* reporter, const char* filename) {
1238 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1239 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
1240 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
1241 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1242 testSimplify(reporter, path, filename);
1245 static void testLine63x(skiatest::Reporter* reporter, const char* filename) {
1247 path.setFillType(SkPath::kEvenOdd_FillType);
1248 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1249 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
1250 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
1251 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1252 testSimplify(reporter, path, filename);
1255 static void testLine64(skiatest::Reporter* reporter, const char* filename) {
1257 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1258 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1259 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
1260 testSimplify(reporter, path, filename);
1263 static void testLine64x(skiatest::Reporter* reporter, const char* filename) {
1265 path.setFillType(SkPath::kEvenOdd_FillType);
1266 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1267 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1268 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
1269 testSimplify(reporter, path, filename);
1272 static void testLine65(skiatest::Reporter* reporter, const char* filename) {
1274 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1275 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
1276 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
1277 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1278 testSimplify(reporter, path, filename);
1281 static void testLine65x(skiatest::Reporter* reporter, const char* filename) {
1283 path.setFillType(SkPath::kEvenOdd_FillType);
1284 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1285 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
1286 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
1287 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1288 testSimplify(reporter, path, filename);
1291 static void testLine66(skiatest::Reporter* reporter, const char* filename) {
1293 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1294 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1295 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1296 testSimplify(reporter, path, filename);
1299 static void testLine66x(skiatest::Reporter* reporter, const char* filename) {
1301 path.setFillType(SkPath::kEvenOdd_FillType);
1302 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1303 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1304 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1305 testSimplify(reporter, path, filename);
1308 static void testLine67(skiatest::Reporter* reporter, const char* filename) {
1310 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1311 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1312 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1313 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1314 testSimplify(reporter, path, filename);
1317 static void testLine67x(skiatest::Reporter* reporter, const char* filename) {
1319 path.setFillType(SkPath::kEvenOdd_FillType);
1320 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1321 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1322 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1323 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1324 testSimplify(reporter, path, filename);
1327 static void testLine68a(skiatest::Reporter* reporter, const char* filename) {
1329 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1330 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1331 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1332 testSimplify(reporter, path, filename);
1335 static void testLine68ax(skiatest::Reporter* reporter, const char* filename) {
1337 path.setFillType(SkPath::kEvenOdd_FillType);
1338 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1339 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1340 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1341 testSimplify(reporter, path, filename);
1344 static void testLine68b(skiatest::Reporter* reporter, const char* filename) {
1346 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1347 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1348 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1349 testSimplify(reporter, path, filename);
1352 static void testLine68bx(skiatest::Reporter* reporter, const char* filename) {
1354 path.setFillType(SkPath::kEvenOdd_FillType);
1355 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1356 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1357 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1358 testSimplify(reporter, path, filename);
1361 static void testLine68c(skiatest::Reporter* reporter, const char* filename) {
1363 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1364 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1365 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1366 testSimplify(reporter, path, filename);
1369 static void testLine68cx(skiatest::Reporter* reporter, const char* filename) {
1371 path.setFillType(SkPath::kEvenOdd_FillType);
1372 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1373 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1374 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1375 testSimplify(reporter, path, filename);
1378 static void testLine68d(skiatest::Reporter* reporter, const char* filename) {
1380 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1381 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1382 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1383 testSimplify(reporter, path, filename);
1386 static void testLine68dx(skiatest::Reporter* reporter, const char* filename) {
1388 path.setFillType(SkPath::kEvenOdd_FillType);
1389 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1390 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1391 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1392 testSimplify(reporter, path, filename);
1395 static void testLine68e(skiatest::Reporter* reporter, const char* filename) {
1397 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1398 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1399 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1400 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1401 testSimplify(reporter, path, filename);
1404 static void testLine68ex(skiatest::Reporter* reporter, const char* filename) {
1406 path.setFillType(SkPath::kEvenOdd_FillType);
1407 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1408 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1409 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1410 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1411 testSimplify(reporter, path, filename);
1414 static void testLine68f(skiatest::Reporter* reporter, const char* filename) {
1416 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1417 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1418 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1419 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1420 testSimplify(reporter, path, filename);
1423 static void testLine68fx(skiatest::Reporter* reporter, const char* filename) {
1425 path.setFillType(SkPath::kEvenOdd_FillType);
1426 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1427 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1428 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1429 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1430 testSimplify(reporter, path, filename);
1433 static void testLine68g(skiatest::Reporter* reporter, const char* filename) {
1435 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1436 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1437 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1438 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1439 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1440 testSimplify(reporter, path, filename);
1443 static void testLine68gx(skiatest::Reporter* reporter, const char* filename) {
1445 path.setFillType(SkPath::kEvenOdd_FillType);
1446 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1447 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1448 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1449 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1450 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1451 testSimplify(reporter, path, filename);
1454 static void testLine68h(skiatest::Reporter* reporter, const char* filename) {
1456 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1457 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1458 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1459 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1460 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1461 testSimplify(reporter, path, filename);
1464 static void testLine68hx(skiatest::Reporter* reporter, const char* filename) {
1466 path.setFillType(SkPath::kEvenOdd_FillType);
1467 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1468 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1469 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1470 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1471 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1472 testSimplify(reporter, path, filename);
1475 static void testLine69(skiatest::Reporter* reporter, const char* filename) {
1477 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1478 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1479 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1480 testSimplify(reporter, path, filename);
1483 static void testLine69x(skiatest::Reporter* reporter, const char* filename) {
1485 path.setFillType(SkPath::kEvenOdd_FillType);
1486 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1487 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1488 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1489 testSimplify(reporter, path, filename);
1492 static void testLine70(skiatest::Reporter* reporter, const char* filename) {
1494 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1495 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
1496 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1497 testSimplify(reporter, path, filename);
1500 static void testLine70x(skiatest::Reporter* reporter, const char* filename) {
1502 path.setFillType(SkPath::kEvenOdd_FillType);
1503 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1504 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
1505 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1506 testSimplify(reporter, path, filename);
1509 static void testLine71(skiatest::Reporter* reporter, const char* filename) {
1511 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1512 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
1513 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1514 testSimplify(reporter, path, filename);
1517 static void testLine71x(skiatest::Reporter* reporter, const char* filename) {
1519 path.setFillType(SkPath::kEvenOdd_FillType);
1520 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1521 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
1522 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1523 testSimplify(reporter, path, filename);
1526 static void testLine72(skiatest::Reporter* reporter, const char* filename) {
1528 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1529 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1530 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1531 testSimplify(reporter, path, filename);
1534 static void testLine72x(skiatest::Reporter* reporter, const char* filename) {
1536 path.setFillType(SkPath::kEvenOdd_FillType);
1537 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1538 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1539 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1540 testSimplify(reporter, path, filename);
1543 static void testLine73(skiatest::Reporter* reporter, const char* filename) {
1545 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1546 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
1547 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1548 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
1549 testSimplify(reporter, path, filename);
1552 static void testLine73x(skiatest::Reporter* reporter, const char* filename) {
1554 path.setFillType(SkPath::kEvenOdd_FillType);
1555 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1556 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
1557 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1558 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
1559 testSimplify(reporter, path, filename);
1562 static void testLine74(skiatest::Reporter* reporter, const char* filename) {
1564 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
1565 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1566 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
1567 testSimplify(reporter, path, filename);
1570 static void testLine74x(skiatest::Reporter* reporter, const char* filename) {
1572 path.setFillType(SkPath::kEvenOdd_FillType);
1573 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
1574 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1575 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
1576 testSimplify(reporter, path, filename);
1579 static void testLine75(skiatest::Reporter* reporter, const char* filename) {
1581 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1582 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
1583 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
1584 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1585 testSimplify(reporter, path, filename);
1588 static void testLine75x(skiatest::Reporter* reporter, const char* filename) {
1590 path.setFillType(SkPath::kEvenOdd_FillType);
1591 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1592 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
1593 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
1594 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1595 testSimplify(reporter, path, filename);
1598 static void testLine76(skiatest::Reporter* reporter, const char* filename) {
1600 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
1601 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
1602 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1603 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1604 testSimplify(reporter, path, filename);
1607 static void testLine76x(skiatest::Reporter* reporter, const char* filename) {
1609 path.setFillType(SkPath::kEvenOdd_FillType);
1610 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
1611 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
1612 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1613 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1614 testSimplify(reporter, path, filename);
1617 static void testLine77(skiatest::Reporter* reporter, const char* filename) {
1619 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1620 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
1621 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
1622 testSimplify(reporter, path, filename);
1625 static void testLine77x(skiatest::Reporter* reporter, const char* filename) {
1627 path.setFillType(SkPath::kEvenOdd_FillType);
1628 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1629 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
1630 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
1631 testSimplify(reporter, path, filename);
1634 static void testLine78(skiatest::Reporter* reporter, const char* filename) {
1636 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
1637 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
1638 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
1639 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
1640 testSimplify(reporter, path, filename);
1643 static void testLine78x(skiatest::Reporter* reporter, const char* filename) {
1645 path.setFillType(SkPath::kEvenOdd_FillType);
1646 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
1647 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
1648 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
1649 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
1650 testSimplify(reporter, path, filename);
1653 static void testLine79(skiatest::Reporter* reporter, const char* filename) {
1655 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
1656 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
1657 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
1658 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1659 testSimplify(reporter, path, filename);
1662 static void testLine79x(skiatest::Reporter* reporter, const char* filename) {
1664 path.setFillType(SkPath::kEvenOdd_FillType);
1665 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
1666 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
1667 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
1668 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1669 testSimplify(reporter, path, filename);
1672 static void testLine81(skiatest::Reporter* reporter, const char* filename) {
1674 path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction);
1675 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1676 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1677 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1678 path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction);
1679 testSimplify(reporter, path, filename);
1682 static void testDegenerate1(skiatest::Reporter* reporter, const char* filename) {
1692 testSimplify(reporter, path, filename);
1695 static void testDegenerate1x(skiatest::Reporter* reporter, const char* filename) {
1697 path.setFillType(SkPath::kEvenOdd_FillType);
1706 testSimplify(reporter, path, filename);
1709 static void testDegenerate2(skiatest::Reporter* reporter, const char* filename) {
1719 testSimplify(reporter, path, filename);
1722 static void testDegenerate2x(skiatest::Reporter* reporter, const char* filename) {
1724 path.setFillType(SkPath::kEvenOdd_FillType);
1733 testSimplify(reporter, path, filename);
1736 static void testDegenerate3(skiatest::Reporter* reporter, const char* filename) {
1746 testSimplify(reporter, path, filename);
1749 static void testDegenerate3x(skiatest::Reporter* reporter, const char* filename) {
1751 path.setFillType(SkPath::kEvenOdd_FillType);
1760 testSimplify(reporter, path, filename);
1763 static void testDegenerate4(skiatest::Reporter* reporter, const char* filename) {
1773 testSimplify(reporter, path, filename);
1776 static void testDegenerate4x(skiatest::Reporter* reporter, const char* filename) {
1778 path.setFillType(SkPath::kEvenOdd_FillType);
1787 testSimplify(reporter, path, filename);
1790 static void testNondegenerate1(skiatest::Reporter* reporter, const char* filename) {
1800 testSimplify(reporter, path, filename);
1803 static void testNondegenerate1x(skiatest::Reporter* reporter, const char* filename) {
1805 path.setFillType(SkPath::kEvenOdd_FillType);
1814 testSimplify(reporter, path, filename);
1817 static void testNondegenerate2(skiatest::Reporter* reporter, const char* filename) {
1827 testSimplify(reporter, path, filename);
1830 static void testNondegenerate2x(skiatest::Reporter* reporter, const char* filename) {
1832 path.setFillType(SkPath::kEvenOdd_FillType);
1841 testSimplify(reporter, path, filename);
1844 static void testNondegenerate3(skiatest::Reporter* reporter, const char* filename) {
1854 testSimplify(reporter, path, filename);
1857 static void testNondegenerate3x(skiatest::Reporter* reporter, const char* filename) {
1859 path.setFillType(SkPath::kEvenOdd_FillType);
1868 testSimplify(reporter, path, filename);
1871 static void testNondegenerate4(skiatest::Reporter* reporter, const char* filename) {
1881 testSimplify(reporter, path, filename);
1884 static void testNondegenerate4x(skiatest::Reporter* reporter, const char* filename) {
1886 path.setFillType(SkPath::kEvenOdd_FillType);
1895 testSimplify(reporter, path, filename);
1898 static void testQuadralateral5(skiatest::Reporter* reporter, const char* filename) {
1910 testSimplify(reporter, path, filename);
1913 static void testQuadralateral5x(skiatest::Reporter* reporter, const char* filename) {
1915 path.setFillType(SkPath::kEvenOdd_FillType);
1926 testSimplify(reporter, path, filename);
1929 static void testQuadralateral6(skiatest::Reporter* reporter, const char* filename) {
1941 testSimplify(reporter, path, filename);
1944 static void testQuadralateral6x(skiatest::Reporter* reporter, const char* filename) {
1946 path.setFillType(SkPath::kEvenOdd_FillType);
1957 testSimplify(reporter, path, filename);
1960 static void testFauxQuadralateral6(skiatest::Reporter* reporter, const char* filename) {
1968 path.lineTo(1 + 1.0f/3, 2.0f/3);
1970 path.moveTo(1 + 1.0f/3, 2.0f/3);
1974 testSimplify(reporter, path, filename);
1977 static void testFauxQuadralateral6x(skiatest::Reporter* reporter, const char* filename) {
1979 path.setFillType(SkPath::kEvenOdd_FillType);
1986 path.lineTo(1 + 1.0f/3, 2.0f/3);
1988 path.moveTo(1 + 1.0f/3, 2.0f/3);
1992 testSimplify(reporter, path, filename);
1995 static void testFauxQuadralateral6a(skiatest::Reporter* reporter, const char* filename) {
2009 testSimplify(reporter, path, filename);
2012 static void testFauxQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) {
2014 path.setFillType(SkPath::kEvenOdd_FillType);
2027 testSimplify(reporter, path, filename);
2030 static void testFauxQuadralateral6b(skiatest::Reporter* reporter, const char* filename) {
2044 testSimplify(reporter, path, filename);
2047 static void testFauxQuadralateral6bx(skiatest::Reporter* reporter, const char* filename) {
2049 path.setFillType(SkPath::kEvenOdd_FillType);
2062 testSimplify(reporter, path, filename);
2065 static void testFauxQuadralateral6c(skiatest::Reporter* reporter, const char* filename) {
2079 testSimplify(reporter, path, filename);
2082 static void testFauxQuadralateral6cx(skiatest::Reporter* reporter, const char* filename) {
2084 path.setFillType(SkPath::kEvenOdd_FillType);
2097 testSimplify(reporter, path, filename);
2100 static void testFauxQuadralateral6d(skiatest::Reporter* reporter, const char* filename) {
2114 testSimplify(reporter, path, filename);
2117 static void testFauxQuadralateral6dx(skiatest::Reporter* reporter, const char* filename) {
2119 path.setFillType(SkPath::kEvenOdd_FillType);
2132 testSimplify(reporter, path, filename);
2135 static void testQuadralateral6a(skiatest::Reporter* reporter, const char* filename) {
2147 testSimplify(reporter, path, filename);
2150 static void testQuadralateral6ax(skiatest::Reporter* reporter, const char* filename) {
2152 path.setFillType(SkPath::kEvenOdd_FillType);
2163 testSimplify(reporter, path, filename);
2166 static void testQuadralateral7(skiatest::Reporter* reporter, const char* filename) {
2178 testSimplify(reporter, path, filename);
2181 static void testQuadralateral7x(skiatest::Reporter* reporter, const char* filename) {
2183 path.setFillType(SkPath::kEvenOdd_FillType);
2194 testSimplify(reporter, path, filename);
2197 static void testQuadralateral8(skiatest::Reporter* reporter, const char* filename) {
2209 testSimplify(reporter, path, filename);
2212 static void testQuadralateral8x(skiatest::Reporter* reporter, const char* filename) {
2214 path.setFillType(SkPath::kEvenOdd_FillType);
2225 testSimplify(reporter, path, filename);
2228 static void testQuadralateral9(skiatest::Reporter* reporter, const char* filename) {
2240 testSimplify(reporter, path, filename);
2243 static void testQuadralateral9x(skiatest::Reporter* reporter, const char* filename) {
2245 path.setFillType(SkPath::kEvenOdd_FillType);
2256 testSimplify(reporter, path, filename);
2259 static void testLine1a(skiatest::Reporter* reporter, const char* filename) {
2261 path.setFillType(SkPath::kWinding_FillType);
2262 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
2263 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
2264 testSimplify(reporter, path, filename);
2267 static void testLine1ax(skiatest::Reporter* reporter, const char* filename) {
2269 path.setFillType(SkPath::kEvenOdd_FillType);
2270 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
2271 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
2272 testSimplify(reporter, path, filename);
2275 static void testLine2ax(skiatest::Reporter* reporter, const char* filename) {
2277 path.setFillType(SkPath::kEvenOdd_FillType);
2278 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
2279 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
2280 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
2281 testSimplify(reporter, path, filename);
2284 static void testLine3aax(skiatest::Reporter* reporter, const char* filename) {
2286 path.setFillType(SkPath::kEvenOdd_FillType);
2287 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
2288 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
2289 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
2290 testSimplify(reporter, path, filename);
2293 static void testLine4ax(skiatest::Reporter* reporter, const char* filename) {
2295 path.setFillType(SkPath::kEvenOdd_FillType);
2296 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
2297 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
2298 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
2299 testSimplify(reporter, path, filename);
2302 static void testQuadratic1(skiatest::Reporter* reporter, const char* filename) {
2305 path.quadTo(0, 0, 0, 0);
2310 path.quadTo(0, 0, 0, 0);
2312 testSimplify(reporter, path, filename);
2315 static void testQuadratic1x(skiatest::Reporter* reporter, const char* filename) {
2317 path.setFillType(SkPath::kEvenOdd_FillType);
2319 path.quadTo(0, 0, 0, 0);
2324 path.quadTo(0, 0, 0, 0);
2326 testSimplify(reporter, path, filename);
2329 static void testQuadratic2(skiatest::Reporter* reporter, const char* filename) {
2332 path.quadTo(0, 0, 0, 0);
2337 path.quadTo(1, 0, 0, 1);
2339 testSimplify(reporter, path, filename);
2342 static void testQuadratic2x(skiatest::Reporter* reporter, const char* filename) {
2344 path.setFillType(SkPath::kEvenOdd_FillType);
2346 path.quadTo(0, 0, 0, 0);
2351 path.quadTo(1, 0, 0, 1);
2353 testSimplify(reporter, path, filename);
2356 static void testQuadratic3(skiatest::Reporter* reporter, const char* filename) {
2359 path.quadTo(0, 0, 1, 0);
2364 path.quadTo(1, 0, 0, 1);
2366 testSimplify(reporter, path, filename);
2369 static void testQuadratic3x(skiatest::Reporter* reporter, const char* filename) {
2371 path.setFillType(SkPath::kEvenOdd_FillType);
2373 path.quadTo(0, 0, 1, 0);
2378 path.quadTo(1, 0, 0, 1);
2380 testSimplify(reporter, path, filename);
2383 static void testQuadratic4(skiatest::Reporter* reporter, const char* filename) {
2386 path.quadTo(0, 0, 1, 0);
2391 path.quadTo(1, 0, 0, 2);
2393 testSimplify(reporter, path, filename);
2396 static void testQuadratic4x(skiatest::Reporter* reporter, const char* filename) {
2398 path.setFillType(SkPath::kEvenOdd_FillType);
2400 path.quadTo(0, 0, 1, 0);
2405 path.quadTo(1, 0, 0, 2);
2407 testSimplify(reporter, path, filename);
2410 static void testQuadratic5(skiatest::Reporter* reporter, const char* filename) {
2413 path.quadTo(0, 0, 0, 0);
2418 path.quadTo(0, 1, 0, 2);
2420 testSimplify(reporter, path, filename);
2423 static void testQuadratic6(skiatest::Reporter* reporter, const char* filename) {
2426 path.quadTo(0, 0, 1, 0);
2431 path.quadTo(2, 0, 0, 1);
2433 testSimplify(reporter, path, filename);
2436 static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) {
2439 path.quadTo(0, 0, 1, 0);
2444 path.quadTo(3, 0, 1, 2);
2446 testSimplify(reporter, path, filename);
2449 static void testQuadratic8(skiatest::Reporter* reporter, const char* filename) {
2452 path.quadTo(0, 0, 1, 0);
2457 path.quadTo(0, 1, 1, 2);
2459 testSimplify(reporter, path, filename);
2462 static void testQuadratic9(skiatest::Reporter* reporter, const char* filename) {
2465 path.quadTo(0, 0, 1, 0);
2470 path.quadTo(1, 2, 3, 2);
2472 testSimplify(reporter, path, filename);
2475 static void testQuadratic14(skiatest::Reporter* reporter, const char* filename) {
2478 path.quadTo(0, 0, 1, 0);
2483 path.quadTo(3, 2, 3, 3);
2485 testSimplify(reporter, path, filename);
2488 static void testQuadratic15(skiatest::Reporter* reporter, const char* filename) {
2491 path.quadTo(0, 0, 1, 0);
2496 path.quadTo(1, 1, 0, 3);
2498 testSimplify(reporter, path, filename);
2501 static void testQuadratic17x(skiatest::Reporter* reporter, const char* filename) {
2503 path.setFillType(SkPath::kEvenOdd_FillType);
2505 path.quadTo(0, 0, 3, 1);
2510 path.quadTo(3, 1, 0, 2);
2512 testSimplify(reporter, path, filename);
2515 static void testQuadratic18(skiatest::Reporter* reporter, const char* filename) {
2518 path.quadTo(1, 0, 0, 1);
2523 path.quadTo(1, 0, 1, 1);
2525 testSimplify(reporter, path, filename);
2528 static void testQuadratic19(skiatest::Reporter* reporter, const char* filename) {
2531 path.quadTo(1, 0, 0, 1);
2536 path.quadTo(2, 0, 0, 1);
2538 testSimplify(reporter, path, filename);
2541 static void testQuadratic20(skiatest::Reporter* reporter, const char* filename) {
2544 path.quadTo(1, 0, 0, 1);
2549 path.quadTo(1, 0, 0, 1);
2551 testSimplify(reporter, path, filename);
2554 static void testQuadratic21(skiatest::Reporter* reporter, const char* filename) {
2557 path.quadTo(1, 0, 0, 1);
2562 path.quadTo(1, 0, 0, 2);
2564 testSimplify(reporter, path, filename);
2567 static void testQuadratic22(skiatest::Reporter* reporter, const char* filename) {
2570 path.quadTo(1, 0, 0, 1);
2575 path.quadTo(0, 1, 2, 1);
2577 testSimplify(reporter, path, filename);
2580 static void testQuadratic23(skiatest::Reporter* reporter, const char* filename) {
2583 path.quadTo(1, 0, 0, 1);
2588 path.quadTo(0, 2, 1, 2);
2590 testSimplify(reporter, path, filename);
2593 static void testQuadratic24(skiatest::Reporter* reporter, const char* filename) {
2596 path.quadTo(1, 0, 0, 1);
2601 path.quadTo(2, 0, 0, 1);
2603 testSimplify(reporter, path, filename);
2606 static void testQuadratic25(skiatest::Reporter* reporter, const char* filename) {
2609 path.quadTo(1, 0, 1, 1);
2614 path.quadTo(2, 1, 0, 2);
2616 testSimplify(reporter, path, filename);
2619 static void testQuadratic26(skiatest::Reporter* reporter, const char* filename) {
2622 path.quadTo(1, 0, 1, 1);
2627 path.quadTo(1, 0, 0, 1);
2629 testSimplify(reporter, path, filename);
2632 static void testQuadratic27(skiatest::Reporter* reporter, const char* filename) {
2635 path.quadTo(1, 0, 1, 1);
2640 path.quadTo(2, 1, 0, 2);
2642 testSimplify(reporter, path, filename);
2645 static void testQuadratic28(skiatest::Reporter* reporter, const char* filename) {
2648 path.quadTo(1, 0, 0, 1);
2653 path.quadTo(1, 2, 0, 3);
2655 testSimplify(reporter, path, filename);
2658 static void testQuadratic29(skiatest::Reporter* reporter, const char* filename) {
2661 path.quadTo(1, 0, 2, 1);
2666 path.quadTo(1, 0, 0, 1);
2668 testSimplify(reporter, path, filename);
2671 static void testQuadratic30(skiatest::Reporter* reporter, const char* filename) {
2674 path.quadTo(1, 0, 1, 2);
2679 path.quadTo(0, 1, 1, 2);
2681 testSimplify(reporter, path, filename);
2684 static void testQuadratic31(skiatest::Reporter* reporter, const char* filename) {
2687 path.quadTo(1, 0, 1, 2);
2692 path.quadTo(0, 1, 1, 3);
2694 testSimplify(reporter, path, filename);
2697 static void testQuadratic32(skiatest::Reporter* reporter, const char* filename) {
2700 path.quadTo(1, 0, 2, 3);
2705 path.quadTo(3, 1, 0, 2);
2707 testSimplify(reporter, path, filename);
2710 static void testQuadratic33(skiatest::Reporter* reporter, const char* filename) {
2713 path.quadTo(2, 0, 0, 1);
2718 path.quadTo(2, 1, 2, 2);
2720 testSimplify(reporter, path, filename);
2723 static void testQuadratic34(skiatest::Reporter* reporter, const char* filename) {
2726 path.quadTo(2, 0, 0, 1);
2731 path.quadTo(2, 1, 1, 2);
2733 testSimplify(reporter, path, filename);
2736 static void testQuadratic35(skiatest::Reporter* reporter, const char* filename) {
2739 path.quadTo(0, 1, 1, 1);
2744 path.quadTo(0, 1, 1, 1);
2746 testSimplify(reporter, path, filename);
2749 static void testQuadratic36(skiatest::Reporter* reporter, const char* filename) {
2752 path.quadTo(2, 1, 2, 3);
2757 path.quadTo(3, 2, 1, 3);
2759 testSimplify(reporter, path, filename);
2762 static void testQuadratic37(skiatest::Reporter* reporter, const char* filename) {
2765 path.quadTo(0, 2, 1, 2);
2770 path.quadTo(0, 2, 1, 2);
2772 testSimplify(reporter, path, filename);
2775 static void testQuadratic38(skiatest::Reporter* reporter, const char* filename) {
2778 path.quadTo(0, 1, 1, 1);
2783 path.quadTo(2, 2, 1, 3);
2785 testSimplify(reporter, path, filename);
2788 static void testQuadratic51(skiatest::Reporter* reporter, const char* filename) {
2790 path.moveTo(369.863983f, 145.645813f);
2791 path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f);
2792 path.lineTo(369.863983f, 145.645813f);
2794 path.moveTo(369.970581f, 137.94342f);
2795 path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f);
2796 path.lineTo(369.970581f, 137.94342f);
2798 testSimplify(reporter, path, filename);
2801 static void testQuadratic53(skiatest::Reporter* reporter, const char* filename) {
2803 path.moveTo(303.12088f, 141.299606f);
2804 path.lineTo(330.463562f, 217.659027f);
2805 path.lineTo(303.12088f, 141.299606f);
2807 path.moveTo(371.919067f, 205.854996f);
2808 path.lineTo(326.236786f, 205.854996f);
2809 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2810 path.lineTo(371.919067f, 205.854996f);
2812 testSimplify(reporter, path, filename);
2815 static void testQuadratic55(skiatest::Reporter* reporter, const char* filename) {
2817 path.moveTo(303.12088f, 141.299606f);
2818 path.lineTo(330.463562f, 217.659027f);
2819 path.lineTo(358.606506f, 141.299606f);
2820 path.lineTo(303.12088f, 141.299606f);
2822 path.moveTo(326.236786f, 205.854996f);
2823 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2824 path.lineTo(326.236786f, 205.854996f);
2826 testSimplify(reporter, path, filename);
2829 static void testQuadratic56(skiatest::Reporter* reporter, const char* filename) {
2831 path.moveTo(366.608826f, 151.196014f);
2832 path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f);
2833 path.lineTo(354.009216f, 208.816208f);
2834 path.lineTo(393.291473f, 102.232819f);
2835 path.lineTo(359.978058f, 136.581512f);
2836 path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f);
2837 path.lineTo(364.390686f, 157.898193f);
2838 path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f);
2839 path.lineTo(350, 120);
2840 path.lineTo(366.608826f, 151.196014f);
2842 testSimplify(reporter, path, filename);
2845 static void testLine80(skiatest::Reporter* reporter, const char* filename) {
2856 testSimplify(reporter, path, filename);
2859 static void testQuadratic58(skiatest::Reporter* reporter, const char* filename) {
2861 path.moveTo(283.714233f, 240);
2862 path.lineTo(283.714233f, 141.299606f);
2863 path.lineTo(303.12088f, 141.299606f);
2864 path.lineTo(330.463562f, 217.659027f);
2865 path.lineTo(358.606506f, 141.299606f);
2866 path.lineTo(362.874634f, 159.705902f);
2867 path.lineTo(335.665344f, 233.397751f);
2868 path.lineTo(322.12738f, 233.397751f);
2869 path.lineTo(295.718353f, 159.505829f);
2870 path.lineTo(295.718353f, 240);
2871 path.lineTo(283.714233f, 240);
2873 path.moveTo(322.935669f, 231.030273f);
2874 path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f);
2875 path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f);
2876 path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f);
2877 path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f);
2878 path.lineTo(371.919067f, 205.854996f);
2879 path.lineTo(326.236786f, 205.854996f);
2880 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2881 path.lineTo(322.935669f, 231.030273f);
2883 path.moveTo(326.837006f, 195.984955f);
2884 path.lineTo(358.78125f, 195.984955f);
2885 path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f);
2886 path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f);
2888 testSimplify(reporter, path, filename);
2891 static void testQuadratic59x(skiatest::Reporter* reporter, const char* filename) {
2893 path.setFillType(SkPath::kEvenOdd_FillType);
2895 path.quadTo(0, 0, 0, 0);
2900 path.quadTo(3, 1, 1, 2);
2902 testSimplify(reporter, path, filename);
2905 static void testQuadratic59(skiatest::Reporter* reporter, const char* filename) {
2907 path.setFillType(SkPath::kWinding_FillType);
2909 path.quadTo(0, 0, 0, 0);
2914 path.quadTo(3, 1, 1, 2);
2916 testSimplify(reporter, path, filename);
2919 static void testQuadratic63(skiatest::Reporter* reporter, const char* filename) {
2922 path.quadTo(0, 0, 0, 0);
2927 path.quadTo(2, 1, 2, 2);
2929 testSimplify(reporter, path, filename);
2932 static void testQuadratic64(skiatest::Reporter* reporter, const char* filename) {
2935 path.quadTo(0, 0, 0, 0);
2940 path.quadTo(0, 3, 3, 3);
2942 testSimplify(reporter, path, filename);
2945 static void testQuadratic65(skiatest::Reporter* reporter, const char* filename) {
2948 path.quadTo(0, 0, 0, 0);
2953 path.quadTo(0, 3, 1, 3);
2955 testSimplify(reporter, path, filename);
2958 static void testQuadratic67x(skiatest::Reporter* reporter, const char* filename) {
2960 path.setFillType(SkPath::kEvenOdd_FillType);
2962 path.quadTo(0, 0, 2, 1);
2967 path.quadTo(1, 1, 3, 2);
2969 testSimplify(reporter, path, filename);
2972 static void testQuadratic68(skiatest::Reporter* reporter, const char* filename) {
2975 path.quadTo(1, 0, 0, 1);
2980 path.quadTo(0, 1, 2, 1);
2982 testSimplify(reporter, path, filename);
2985 static void testQuadratic69(skiatest::Reporter* reporter, const char* filename) {
2988 path.quadTo(0, 0, 0, 1);
2993 path.quadTo(3, 2, 2, 3);
2995 testSimplify(reporter, path, filename);
2998 static void testQuadratic70x(skiatest::Reporter* reporter, const char* filename) {
3000 path.setFillType(SkPath::kEvenOdd_FillType);
3002 path.quadTo(1, 0, 0, 1);
3007 path.quadTo(0, 1, 2, 1);
3009 testSimplify(reporter, path, filename);
3012 static void testQuadratic71(skiatest::Reporter* reporter, const char* filename) {
3015 path.quadTo(1, 0, 1, 1);
3020 path.quadTo(1, 1, 3, 1);
3022 testSimplify(reporter, path, filename);
3025 static void testQuadratic72(skiatest::Reporter* reporter, const char* filename) {
3028 path.quadTo(1, 0, 1, 2);
3033 path.quadTo(0, 1, 3, 2);
3035 testSimplify(reporter, path, filename);
3038 static void testQuadratic73(skiatest::Reporter* reporter, const char* filename) {
3041 path.quadTo(1, 0, 0, 3);
3046 path.quadTo(0, 1, 1, 1);
3048 testSimplify(reporter, path, filename);
3051 static void testQuadratic74(skiatest::Reporter* reporter, const char* filename) {
3054 path.quadTo(1, 0, 1, 3);
3059 path.quadTo(3, 2, 2, 3);
3061 testSimplify(reporter, path, filename);
3064 static void testQuadratic75(skiatest::Reporter* reporter, const char* filename) {
3067 path.quadTo(1, 0, 1, 3);
3072 path.quadTo(3, 2, 2, 3);
3074 testSimplify(reporter, path, filename);
3077 static void testQuadratic76(skiatest::Reporter* reporter, const char* filename) {
3080 path.quadTo(0, 0, 0, 0);
3085 path.quadTo(1, 2, 2, 2);
3087 testSimplify(reporter, path, filename);
3090 static void testQuadratic77(skiatest::Reporter* reporter, const char* filename) {
3093 path.quadTo(1, 0, 1, 1);
3098 path.quadTo(0, 1, 3, 2);
3100 testSimplify(reporter, path, filename);
3103 static void testQuadratic78(skiatest::Reporter* reporter, const char* filename) {
3106 path.quadTo(1, 0, 1, 2);
3111 path.quadTo(2, 1, 0, 2);
3113 testSimplify(reporter, path, filename);
3116 static void testQuadratic79(skiatest::Reporter* reporter, const char* filename) {
3119 path.quadTo(1, 0, 1, 2);
3124 path.quadTo(0, 1, 3, 2);
3126 testSimplify(reporter, path, filename);
3129 static void testEight1(skiatest::Reporter* reporter, const char* filename) {
3136 testSimplify(reporter, path, filename);
3139 static void testEight2(skiatest::Reporter* reporter, const char* filename) {
3146 testSimplify(reporter, path, filename);
3149 static void testEight3(skiatest::Reporter* reporter, const char* filename) {
3156 testSimplify(reporter, path, filename);
3159 static void testEight4(skiatest::Reporter* reporter, const char* filename) {
3166 testSimplify(reporter, path, filename);
3169 static void testEight5(skiatest::Reporter* reporter, const char* filename) {
3176 testSimplify(reporter, path, filename);
3179 static void testEight6(skiatest::Reporter* reporter, const char* filename) {
3186 testSimplify(reporter, path, filename);
3189 static void testEight7(skiatest::Reporter* reporter, const char* filename) {
3196 testSimplify(reporter, path, filename);
3199 static void testEight8(skiatest::Reporter* reporter, const char* filename) {
3206 testSimplify(reporter, path, filename);
3209 static void testEight9(skiatest::Reporter* reporter, const char* filename) {
3216 testSimplify(reporter, path, filename);
3219 static void testEight10(skiatest::Reporter* reporter, const char* filename) {
3226 testSimplify(reporter, path, filename);
3229 static void testQuadratic80(skiatest::Reporter* reporter, const char* filename) {
3232 path.quadTo(1, 0, 2, 3);
3237 path.quadTo(0, 1, 1, 1);
3239 testSimplify(reporter, path, filename);
3242 static void testQuadratic81(skiatest::Reporter* reporter, const char* filename) {
3245 path.quadTo(2, 0, 1, 1);
3250 path.quadTo(2, 1, 0, 2);
3252 testSimplify(reporter, path, filename);
3255 static void testQuadratic82(skiatest::Reporter* reporter, const char* filename) {
3258 path.quadTo(2, 0, 1, 1);
3263 path.quadTo(2, 1, 0, 2);
3265 testSimplify(reporter, path, filename);
3268 static void testQuadratic83(skiatest::Reporter* reporter, const char* filename) {
3271 path.quadTo(0, 0, 2, 0);
3276 path.quadTo(2, 2, 1, 3);
3278 testSimplify(reporter, path, filename);
3281 static void testQuadratic84(skiatest::Reporter* reporter, const char* filename) {
3284 path.quadTo(2, 0, 1, 1);
3289 path.quadTo(0, 1, 2, 2);
3291 testSimplify(reporter, path, filename);
3294 static void testQuadratic85(skiatest::Reporter* reporter, const char* filename) {
3297 path.quadTo(3, 0, 1, 1);
3302 path.quadTo(0, 1, 1, 2);
3304 testSimplify(reporter, path, filename);
3307 static void testQuadratic86(skiatest::Reporter* reporter, const char* filename) {
3310 path.quadTo(0, 1, 1, 1);
3315 path.quadTo(1, 1, 1, 3);
3317 testSimplify(reporter, path, filename);
3320 static void testQuadratic87(skiatest::Reporter* reporter, const char* filename) {
3323 path.quadTo(2, 1, 0, 2);
3328 path.quadTo(0, 2, 3, 2);
3330 testSimplify(reporter, path, filename);
3333 static void testQuadratic88(skiatest::Reporter* reporter, const char* filename) {
3336 path.quadTo(2, 1, 0, 2);
3341 path.quadTo(0, 2, 2, 2);
3343 testSimplify(reporter, path, filename);
3346 static void testQuadratic89x(skiatest::Reporter* reporter, const char* filename) {
3348 path.setFillType(SkPath::kEvenOdd_FillType);
3350 path.quadTo(3, 1, 2, 2);
3355 path.quadTo(3, 1, 3, 3);
3357 testSimplify(reporter, path, filename);
3360 static void testQuadratic90x(skiatest::Reporter* reporter, const char* filename) {
3362 path.setFillType(SkPath::kEvenOdd_FillType);
3364 path.quadTo(3, 0, 2, 2);
3369 path.quadTo(3, 2, 2, 3);
3371 testSimplify(reporter, path, filename);
3374 static void testQuadratic91(skiatest::Reporter* reporter, const char* filename) {
3377 path.quadTo(3, 2, 2, 3);
3382 path.quadTo(2, 1, 2, 3);
3384 testSimplify(reporter, path, filename);
3387 static void testQuadratic92x(skiatest::Reporter* reporter, const char* filename) {
3389 path.setFillType(SkPath::kEvenOdd_FillType);
3391 path.quadTo(3, 0, 2, 2);
3396 path.quadTo(3, 2, 2, 3);
3398 testSimplify(reporter, path, filename);
3401 static void testLine82(skiatest::Reporter* reporter, const char* filename) {
3403 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
3404 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
3405 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
3406 testSimplify(reporter, path, filename);
3409 static void testLine82a(skiatest::Reporter* reporter, const char* filename) {
3411 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3412 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3413 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3414 testSimplify(reporter, path, filename);
3417 static void testLine82b(skiatest::Reporter* reporter, const char* filename) {
3419 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3420 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3421 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3422 testSimplify(reporter, path, filename);
3425 static void testLine82c(skiatest::Reporter* reporter, const char* filename) {
3427 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3428 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3429 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3430 testSimplify(reporter, path, filename);
3433 static void testLine82d(skiatest::Reporter* reporter, const char* filename) {
3435 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3436 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3437 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3438 testSimplify(reporter, path, filename);
3441 static void testLine82e(skiatest::Reporter* reporter, const char* filename) {
3443 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3444 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3445 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3446 testSimplify(reporter, path, filename);
3449 static void testLine82f(skiatest::Reporter* reporter, const char* filename) {
3451 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3452 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3453 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3454 testSimplify(reporter, path, filename);
3457 static void testLine82g(skiatest::Reporter* reporter, const char* filename) {
3459 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3460 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3461 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3462 testSimplify(reporter, path, filename);
3465 static void testLine82h(skiatest::Reporter* reporter, const char* filename) {
3467 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3468 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3469 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3470 testSimplify(reporter, path, filename);
3473 static void testLine83(skiatest::Reporter* reporter, const char* filename) {
3475 path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction);
3476 path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction);
3477 path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction);
3478 testSimplify(reporter, path, filename);
3481 static void testLine84(skiatest::Reporter* reporter, const char* filename) {
3483 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
3484 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
3485 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
3486 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
3487 testSimplify(reporter, path, filename);
3490 static void testLine84x(skiatest::Reporter* reporter, const char* filename) {
3492 path.setFillType(SkPath::kEvenOdd_FillType);
3493 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
3494 path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction);
3495 path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction);
3496 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
3497 testSimplify(reporter, path, filename);
3500 static void testLine85(skiatest::Reporter* reporter, const char* filename) {
3502 path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction);
3503 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
3504 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
3505 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
3506 testSimplify(reporter, path, filename);
3509 static void testQuadralateral1(skiatest::Reporter* reporter, const char* filename) {
3521 testSimplify(reporter, path, filename);
3524 static void testCubic1(skiatest::Reporter* reporter, const char* filename) {
3527 path.cubicTo(0, 1, 1, 1, 1, 0);
3530 path.cubicTo(0, 0, 0, 1, 1, 1);
3532 testSimplify(reporter, path, filename);
3535 static void testQuadratic93(skiatest::Reporter* reporter, const char* filename) {
3538 path.quadTo(0, 1, 3, 2);
3543 path.quadTo(1, 1, 2, 2);
3545 testSimplify(reporter, path, filename);
3548 static void testCubic2(skiatest::Reporter* reporter, const char* filename) {
3551 path.cubicTo(0,3, 2,1, 4,0);
3554 path.cubicTo(0,4, 2,0, 3,0);
3556 testSimplify(reporter, path, filename);
3559 static void testQuad1(skiatest::Reporter* reporter, const char* filename) {
3562 path.quadTo(0,0, 0,1);
3566 path.quadTo(1,1, 0,2);
3568 testSimplify(reporter, path, filename);
3571 static void testQuadralateral2(skiatest::Reporter* reporter, const char* filename) {
3583 testSimplify(reporter, path, filename);
3586 static void testQuadratic94(skiatest::Reporter* reporter, const char* filename) {
3590 path.quadTo(8, 4, 4, 4);
3591 path.quadTo(4, 0, 0, 0);
3593 testSimplify(reporter, path, filename);
3596 static void testQuadratic95(skiatest::Reporter* reporter, const char* filename) {
3600 path.quadTo(4, 0, 4, 4);
3601 path.quadTo(8, 4, 8, 8);
3603 testSimplify(reporter, path, filename);
3606 static void testQuadratic96(skiatest::Reporter* reporter, const char* filename) {
3610 path.quadTo(0, 4, 4, 4);
3611 path.quadTo(4, 0, 8, 0);
3613 testSimplify(reporter, path, filename);
3616 static void testQuadratic97(skiatest::Reporter* reporter, const char* filename) {
3620 path.quadTo(4, 0, 4, 4);
3621 path.quadTo(0, 4, 0, 8);
3623 testSimplify(reporter, path, filename);
3626 static void testTriangles1(skiatest::Reporter* reporter, const char* filename) {
3636 testSimplify(reporter, path, filename);
3639 static void testTriangles2(skiatest::Reporter* reporter, const char* filename) {
3649 testSimplify(reporter, path, filename);
3652 // A test this for this case:
3653 // contourA has two segments that are coincident
3654 // contourB has two segments that are coincident in the same place
3655 // each ends up with +2/0 pairs for winding count
3656 // since logic in OpSegment::addTCoincident doesn't transfer count (only increments/decrements)
3657 // can this be resolved to +4/0 ?
3658 static void testAddTCoincident1(skiatest::Reporter* reporter, const char* filename) {
3674 testSimplify(reporter, path, filename);
3677 // test with implicit close
3678 static void testAddTCoincident2(skiatest::Reporter* reporter, const char* filename) {
3692 testSimplify(reporter, path, filename);
3695 static void testQuad2(skiatest::Reporter* reporter, const char* filename) {
3698 path.quadTo(0, 1, 3, 2);
3703 path.quadTo(0, 1, 1, 1);
3707 static void testQuad3(skiatest::Reporter* reporter, const char* filename) {
3710 path.quadTo(0, 1, 3, 2);
3715 path.quadTo(0, 1, 1, 1);
3717 testSimplify(reporter, path, filename);
3720 static void testQuad4(skiatest::Reporter* reporter, const char* filename) {
3723 path.quadTo(0, 1, 1, 1);
3728 path.quadTo(0, 1, 2, 2);
3730 testSimplify(reporter, path, filename);
3733 static void testQuad5(skiatest::Reporter* reporter, const char* filename) {
3736 path.quadTo(0, 1, 2, 2);
3741 path.quadTo(0, 1, 1, 1);
3743 testSimplify(reporter, path, filename);
3746 static void testQuad6(skiatest::Reporter* reporter, const char* filename) {
3749 path.quadTo(0, 1, 2, 2);
3754 path.quadTo(0, 1, 1, 1);
3756 testSimplify(reporter, path, filename);
3759 static void testQuad7(skiatest::Reporter* reporter, const char* filename) {
3762 path.quadTo(0, 1, 1, 1);
3767 path.quadTo(0, 1, 1, 2);
3769 testSimplify(reporter, path, filename);
3772 static void testQuadLineIntersect1(skiatest::Reporter* reporter, const char* filename) {
3775 path.quadTo(3, 1, 0, 3);
3780 path.quadTo(3, 1, 0, 2);
3782 testSimplify(reporter, path, filename);
3785 static void testQuadLineIntersect2(skiatest::Reporter* reporter, const char* filename) {
3788 path.quadTo(3, 1, 0, 3);
3793 path.quadTo(3, 1, 0, 2);
3795 testSimplify(reporter, path, filename);
3798 static void testQuadLineIntersect3(skiatest::Reporter* reporter, const char* filename) {
3801 path.quadTo(3, 1, 0, 3);
3806 path.quadTo(3, 1, 0, 2);
3808 testSimplify(reporter, path, filename);
3811 static void skphealth_com76(skiatest::Reporter* reporter, const char* filename) {
3813 path.setFillType(SkPath::kWinding_FillType);
3814 path.moveTo(708.099182f, 7.09919119f);
3815 path.lineTo(708.099182f, 7.09920025f);
3816 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f);
3817 path.lineTo(704.000000f, 33.0000000f);
3818 path.lineTo(705.000000f, 33.0000000f);
3819 path.lineTo(705.000000f, 17.0000000f);
3820 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f);
3821 path.lineTo(708.099182f, 7.09919119f);
3823 path.moveTo(704.000000f, 3.00000000f);
3824 path.lineTo(704.000000f, 33.0000000f);
3825 path.lineTo(705.000000f, 33.0000000f);
3826 path.lineTo(719.500000f, 3.00000000f);
3827 testSimplify(reporter, path, filename);
3830 static void tooCloseTest(skiatest::Reporter* reporter, const char* filename) {
3841 testSimplify(reporter, path, filename);
3844 static void testRect1(skiatest::Reporter* reporter, const char* filename) {
3846 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
3847 path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction);
3848 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
3849 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
3850 testSimplify(reporter, path, filename);
3853 static void testRect2(skiatest::Reporter* reporter, const char* filename) {
3855 path.setFillType(SkPath::kWinding_FillType);
3858 path.lineTo(60, 60);
3861 path.moveTo(30, 20);
3862 path.lineTo(30, 50);
3863 path.lineTo(50, 50);
3864 path.lineTo(50, 20);
3866 path.moveTo(24, 20);
3867 path.lineTo(24, 30);
3868 path.lineTo(36, 30);
3869 path.lineTo(36, 20);
3871 path.moveTo(32, 24);
3872 path.lineTo(32, 41);
3873 path.lineTo(36, 41);
3874 path.lineTo(36, 24);
3876 testSimplify(reporter, path, filename);
3879 static void testTriangles3x(skiatest::Reporter* reporter, const char* filename) {
3881 path.setFillType(SkPath::kEvenOdd_FillType);
3883 path.quadTo(0, 1, 3, 2);
3888 path.quadTo(2, 1, 0, 2);
3890 testSimplify(reporter, path, filename);
3893 static void testQuad8(skiatest::Reporter* reporter, const char* filename) {
3896 path.quadTo(0, 1, 3, 2);
3901 path.quadTo(1, 1, 2, 2);
3903 testSimplify(reporter, path, filename);
3906 static void testTriangles4x(skiatest::Reporter* reporter, const char* filename) {
3908 path.setFillType(SkPath::kEvenOdd_FillType);
3910 path.quadTo(2, 0, 0, 3);
3915 path.quadTo(3, 2, 2, 3);
3917 testSimplify(reporter, path, filename);
3920 static void testQuad9(skiatest::Reporter* reporter, const char* filename) {
3922 path.setFillType(SkPath::kEvenOdd_FillType);
3924 path.quadTo(0, 1, 3, 2);
3929 path.quadTo(2, 1, 1, 3);
3931 testSimplify(reporter, path, filename);
3934 static void testQuad10(skiatest::Reporter* reporter, const char* filename) {
3937 path.quadTo(0, 1, 3, 2);
3942 path.quadTo(2, 3, 3, 3);
3944 testSimplify(reporter, path, filename);
3947 static void testQuad11(skiatest::Reporter* reporter, const char* filename) {
3950 path.quadTo(0, 1, 1, 2);
3955 path.quadTo(1, 3, 3, 3);
3957 testSimplify(reporter, path, filename);
3960 static void testQuad12(skiatest::Reporter* reporter, const char* filename) {
3963 path.quadTo(0, 0, 0, 0);
3968 path.quadTo(1, 0, 0, 1);
3970 testSimplify(reporter, path, filename);
3973 static void testQuadralateral3(skiatest::Reporter* reporter, const char* filename) {
3975 path.setFillType(SkPath::kEvenOdd_FillType);
3986 testSimplify(reporter, path, filename);
3990 static void testDegenerate5(skiatest::Reporter* reporter, const char* filename) {
4000 testSimplify(reporter, path, filename);
4003 static void testQuadralateral4(skiatest::Reporter* reporter, const char* filename) {
4015 testSimplify(reporter, path, filename);
4018 static void testDegenerates1(skiatest::Reporter* reporter, const char* filename) {
4021 path.quadTo(0, 0, 1, 1);
4026 path.quadTo(3, 2, 2, 3);
4028 testSimplify(reporter, path, filename);
4031 static void testQuad13(skiatest::Reporter* reporter, const char* filename) {
4034 path.quadTo(0, 0, 1, 1);
4039 path.quadTo(3, 2, 2, 3);
4041 testSimplify(reporter, path, filename);
4044 static void testQuad14(skiatest::Reporter* reporter, const char* filename) {
4046 path.setFillType(SkPath::kWinding_FillType);
4048 path.quadTo(0, 0, 1, 1);
4053 path.quadTo(3, 1, 1, 3);
4055 testSimplify(reporter, path, filename);
4058 static void testQuad15(skiatest::Reporter* reporter, const char* filename) {
4061 path.quadTo(0, 0, 1, 1);
4066 path.quadTo(2, 0, 1, 3);
4068 testSimplify(reporter, path, filename);
4071 static void testQuads16(skiatest::Reporter* reporter, const char* filename) {
4074 path.quadTo(0, 0, 1, 1);
4079 path.quadTo(0, 1, 3, 2);
4081 testSimplify(reporter, path, filename);
4084 static void testQuads17(skiatest::Reporter* reporter, const char* filename) {
4087 path.quadTo(0, 0, 1, 1);
4092 path.quadTo(0, 2, 3, 2);
4094 testSimplify(reporter, path, filename);
4097 static void testQuads18(skiatest::Reporter* reporter, const char* filename) {
4100 path.quadTo(0, 0, 1, 1);
4105 path.quadTo(1, 2, 3, 2);
4107 testSimplify(reporter, path, filename);
4110 static void testQuads19(skiatest::Reporter* reporter, const char* filename) {
4113 path.quadTo(0, 0, 2, 1);
4118 path.quadTo(2, 1, 1, 2);
4120 testSimplify(reporter, path, filename);
4123 static void testQuads20(skiatest::Reporter* reporter, const char* filename) {
4126 path.quadTo(0, 0, 2, 1);
4131 path.quadTo(2, 1, 1, 3);
4133 testSimplify(reporter, path, filename);
4136 static void testQuads21(skiatest::Reporter* reporter, const char* filename) {
4139 path.quadTo(0, 0, 1, 1);
4144 path.quadTo(3, 0, 2, 3);
4146 testSimplify(reporter, path, filename);
4149 static void testQuads22(skiatest::Reporter* reporter, const char* filename) {
4152 path.quadTo(0, 0, 2, 0);
4157 path.quadTo(0, 1, 3, 2);
4159 testSimplify(reporter, path, filename);
4162 static void testQuads23(skiatest::Reporter* reporter, const char* filename) {
4165 path.quadTo(0, 0, 1, 0);
4170 path.quadTo(0, 1, 3, 2);
4172 testSimplify(reporter, path, filename);
4175 static void testQuads24(skiatest::Reporter* reporter, const char* filename) {
4178 path.quadTo(0, 0, 0, 1);
4183 path.quadTo(0, 2, 3, 3);
4185 testSimplify(reporter, path, filename);
4188 static void testQuads25(skiatest::Reporter* reporter, const char* filename) {
4191 path.quadTo(0, 0, 0, 1);
4196 path.quadTo(3, 0, 2, 3);
4198 testSimplify(reporter, path, filename);
4201 static void testQuads26(skiatest::Reporter* reporter, const char* filename) {
4204 path.quadTo(0, 0, 3, 0);
4209 path.quadTo(0, 1, 3, 2);
4211 testSimplify(reporter, path, filename);
4214 static void testQuads27(skiatest::Reporter* reporter, const char* filename) {
4217 path.quadTo(0, 0, 2, 0);
4222 path.quadTo(3, 0, 1, 3);
4224 testSimplify(reporter, path, filename);
4227 static void testQuads28(skiatest::Reporter* reporter, const char* filename) {
4230 path.quadTo(0, 0, 0, 1);
4235 path.quadTo(3, 0, 2, 3);
4237 testSimplify(reporter, path, filename);
4240 static void testQuads29(skiatest::Reporter* reporter, const char* filename) {
4243 path.quadTo(0, 0, 3, 0);
4248 path.quadTo(3, 1, 0, 2);
4250 testSimplify(reporter, path, filename);
4253 static void testQuads30(skiatest::Reporter* reporter, const char* filename) {
4257 path.quadTo(0, 0, 2, 0);
4262 path.quadTo(3, 2, 1, 3);
4264 testSimplify(reporter, path, filename);
4267 static void testQuads31(skiatest::Reporter* reporter, const char* filename) {
4270 path.quadTo(0, 0, 2, 1);
4276 path.quadTo(2, 1, 1, 3);
4278 testSimplify(reporter, path, filename);
4281 static void testQuads32(skiatest::Reporter* reporter, const char* filename) {
4284 path.quadTo(0, 0, 1, 1);
4289 path.quadTo(3, 1, 0, 3);
4291 testSimplify(reporter, path, filename);
4294 static void testQuads33(skiatest::Reporter* reporter, const char* filename) {
4297 path.quadTo(0, 0, 1, 1);
4302 path.quadTo(3, 0, 2, 3);
4304 testSimplify(reporter, path, filename);
4307 static void testQuads34(skiatest::Reporter* reporter, const char* filename) {
4310 path.quadTo(0, 0, 1, 0);
4315 path.quadTo(2, 0, 3, 3);
4317 testSimplify(reporter, path, filename);
4320 static void testQuads35(skiatest::Reporter* reporter, const char* filename) {
4323 path.quadTo(0, 0, 1, 0);
4328 path.quadTo(3, 1, 0, 3);
4330 testSimplify(reporter, path, filename);
4333 static void testQuads36(skiatest::Reporter* reporter, const char* filename) {
4336 path.quadTo(2, 0, 1, 2);
4341 path.quadTo(3, 0, 2, 3);
4343 testSimplify(reporter, path, filename);
4346 static void testQuads37(skiatest::Reporter* reporter, const char* filename) {
4348 path.setFillType(SkPath::kEvenOdd_FillType);
4350 path.quadTo(2, 0, 1, 2);
4355 path.quadTo(3, 0, 2, 3);
4357 testSimplify(reporter, path, filename);
4360 static void testQuads38(skiatest::Reporter* reporter, const char* filename) {
4363 path.quadTo(3, 0, 0, 2);
4368 path.quadTo(2, 1, 3, 1);
4370 testSimplify(reporter, path, filename);
4373 static void testQuads39(skiatest::Reporter* reporter, const char* filename) {
4376 path.quadTo(3, 0, 0, 3);
4381 path.quadTo(1, 2, 0, 3);
4383 testSimplify(reporter, path, filename);
4385 static void testQuads40(skiatest::Reporter* reporter, const char* filename) {
4388 path.quadTo(3, 0, 3, 3);
4393 path.quadTo(3, 2, 3, 3);
4395 testSimplify(reporter, path, filename);
4398 static void testQuads41(skiatest::Reporter* reporter, const char* filename) {
4401 path.quadTo(0, 0, 1, 0);
4406 path.quadTo(0, 1, 1, 2);
4408 testSimplify(reporter, path, filename);
4412 static void testQuads54(skiatest::Reporter* reporter, const char* filename) {
4415 path.quadTo(2, 0, 1, 1);
4420 path.quadTo(1, 1, 2, 3);
4422 testSimplify(reporter, path, filename);
4424 static void testQuads53(skiatest::Reporter* reporter, const char* filename) {
4427 path.quadTo(2, 0, 1, 1);
4432 path.quadTo(2, 3, 2, 3);
4434 testSimplify(reporter, path, filename);
4436 static void testQuads52(skiatest::Reporter* reporter, const char* filename) {
4439 path.quadTo(2, 0, 1, 1);
4444 path.quadTo(2, 3, 3, 3);
4446 testSimplify(reporter, path, filename);
4448 static void testQuads51(skiatest::Reporter* reporter, const char* filename) {
4451 path.quadTo(3, 0, 2, 1);
4456 path.quadTo(3, 1, 1, 2);
4458 testSimplify(reporter, path, filename);
4460 static void testQuads50(skiatest::Reporter* reporter, const char* filename) {
4463 path.quadTo(3, 0, 2, 1);
4468 path.quadTo(1, 2, 1, 2);
4470 testSimplify(reporter, path, filename);
4472 static void testQuads49(skiatest::Reporter* reporter, const char* filename) {
4475 path.quadTo(3, 0, 2, 1);
4480 path.quadTo(2, 2, 0, 3);
4482 testSimplify(reporter, path, filename);
4484 static void testQuads48(skiatest::Reporter* reporter, const char* filename) {
4487 path.quadTo(3, 0, 2, 1);
4492 path.quadTo(3, 2, 0, 3);
4494 testSimplify(reporter, path, filename);
4496 static void testQuads47(skiatest::Reporter* reporter, const char* filename) {
4499 path.quadTo(3, 0, 2, 1);
4504 path.quadTo(0, 3, 0, 3);
4506 testSimplify(reporter, path, filename);
4509 // this fails because there is a short unorderable segment and the unordered state isn't handled
4510 // correctly later on.
4511 static void testQuads46x(skiatest::Reporter* reporter, const char* filename) {
4513 path.setFillType(SkPath::kEvenOdd_FillType);
4515 path.quadTo(0, 1, 3, 2);
4520 path.quadTo(3, 2, 1, 3);
4522 testSimplify(reporter, path, filename);
4525 static void testQuads45(skiatest::Reporter* reporter, const char* filename) {
4528 path.quadTo(3, 2, 3, 3);
4533 path.quadTo(3, 2, 3, 3);
4535 testSimplify(reporter, path, filename);
4538 static void testQuads44(skiatest::Reporter* reporter, const char* filename) {
4541 path.quadTo(3, 2, 3, 3);
4546 path.quadTo(3, 2, 3, 3);
4548 testSimplify(reporter, path, filename);
4551 static void testQuads43(skiatest::Reporter* reporter, const char* filename) {
4554 path.quadTo(2, 3, 3, 3);
4559 path.quadTo(2, 3, 3, 3);
4561 testSimplify(reporter, path, filename);
4564 static void testQuads42(skiatest::Reporter* reporter, const char* filename) {
4567 path.quadTo(3, 2, 3, 3);
4572 path.quadTo(3, 2, 3, 3);
4574 testSimplify(reporter, path, filename);
4577 static void testQuads56(skiatest::Reporter* reporter, const char* filename) {
4580 path.quadTo(3, 1, 0, 2);
4585 path.quadTo(2, 1, 3, 3);
4587 testSimplify(reporter, path, filename);
4590 static void testQuads57(skiatest::Reporter* reporter, const char* filename) {
4593 path.quadTo(3, 0, 3, 1);
4598 path.quadTo(2, 2, 3, 2);
4600 testSimplify(reporter, path, filename);
4603 static void testQuads58(skiatest::Reporter* reporter, const char* filename) {
4606 path.quadTo(3, 0, 3, 1);
4611 path.quadTo(2, 2, 3, 2);
4613 testSimplify(reporter, path, filename);
4616 static void testQuads59(skiatest::Reporter* reporter, const char* filename) {
4619 path.quadTo(3, 1, 3, 1);
4624 path.quadTo(2, 2, 3, 2);
4626 testSimplify(reporter, path, filename);
4629 static void testQuads60(skiatest::Reporter* reporter, const char* filename) {
4632 path.quadTo(0, 2, 3, 2);
4637 path.quadTo(1, 1, 2, 2);
4639 testSimplify(reporter, path, filename);
4642 static void testQuads61(skiatest::Reporter* reporter, const char* filename) {
4644 path.setFillType(SkPath::kEvenOdd_FillType);
4646 path.quadTo(0, 0, 2, 0);
4651 path.quadTo(1, 0, 2, 2);
4653 testSimplify(reporter, path, filename);
4656 static void testQuadralateral10(skiatest::Reporter* reporter, const char* filename) {
4658 path.setFillType(SkPath::kWinding_FillType);
4669 testSimplify(reporter, path, filename);
4672 static void testRect3(skiatest::Reporter* reporter, const char* filename) {
4674 path.setFillType(SkPath::kEvenOdd_FillType);
4675 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
4676 path.addRect(10, 30, 40, 30, SkPath::kCCW_Direction);
4677 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
4678 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
4679 testSimplify(reporter, path, filename);
4682 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
4684 static TestDesc tests[] = {
4686 TEST(testQuadralateral10),
4732 TEST(testDegenerates1),
4736 TEST(testQuadratic56),
4737 TEST(testQuadralateral4),
4738 TEST(testQuadralateral3),
4739 TEST(testDegenerate5),
4741 TEST(testQuadratic51), // has unorderable angles
4746 TEST(testTriangles4x),
4747 TEST(testTriangles3x),
4751 TEST(skphealth_com76),
4752 TEST(testQuadLineIntersect1),
4753 TEST(testQuadLineIntersect2),
4754 TEST(testQuadLineIntersect3),
4761 TEST(testAddTCoincident2),
4762 TEST(testAddTCoincident1),
4763 TEST(testTriangles2),
4764 TEST(testTriangles1),
4765 TEST(testQuadratic97),
4766 TEST(testQuadratic96),
4767 TEST(testQuadratic95),
4768 TEST(testQuadratic94),
4769 TEST(testQuadralateral2),
4773 TEST(testQuadralateral1),
4787 TEST(testQuadratic93),
4788 TEST(testQuadratic92x),
4789 TEST(testQuadratic91),
4790 TEST(testQuadratic90x),
4791 TEST(testQuadratic89x),
4792 TEST(testQuadratic88),
4793 TEST(testQuadratic87),
4794 TEST(testQuadratic86),
4795 TEST(testQuadratic85),
4796 TEST(testQuadratic84),
4797 TEST(testQuadratic83),
4798 TEST(testQuadratic82),
4799 TEST(testQuadratic81),
4800 TEST(testQuadratic80),
4811 TEST(testQuadratic79),
4812 TEST(testQuadratic78),
4813 TEST(testQuadratic77),
4814 TEST(testQuadratic76),
4815 TEST(testQuadratic75),
4816 TEST(testQuadratic74),
4817 TEST(testQuadratic73),
4818 TEST(testQuadratic72),
4819 TEST(testQuadratic71),
4820 TEST(testQuadratic70x),
4821 TEST(testQuadratic69),
4822 TEST(testQuadratic68),
4823 TEST(testQuadratic67x),
4824 TEST(testQuadratic65),
4825 TEST(testQuadratic64),
4826 TEST(testQuadratic63),
4829 TEST(testQuadratic59),
4830 TEST(testQuadratic59x),
4831 TEST(testQuadratic58),
4832 TEST(testQuadratic55),
4833 TEST(testQuadratic53),
4834 TEST(testQuadratic38),
4835 TEST(testQuadratic37),
4836 TEST(testQuadratic36),
4837 TEST(testQuadratic35),
4838 TEST(testQuadratic34),
4839 TEST(testQuadratic33),
4840 TEST(testQuadratic32),
4841 TEST(testQuadratic31),
4842 TEST(testQuadratic30),
4843 TEST(testQuadratic29),
4844 TEST(testQuadratic28),
4845 TEST(testQuadratic27),
4846 TEST(testQuadratic26),
4847 TEST(testQuadratic25),
4848 TEST(testQuadratic24),
4849 TEST(testQuadratic23),
4850 TEST(testQuadratic22),
4851 TEST(testQuadratic21),
4852 TEST(testQuadratic20),
4853 TEST(testQuadratic19),
4854 TEST(testQuadratic18),
4855 TEST(testQuadratic17x),
4856 TEST(testQuadratic15),
4857 TEST(testQuadratic14),
4858 TEST(testQuadratic9),
4859 TEST(testQuadratic8),
4860 TEST(testQuadratic7),
4861 TEST(testQuadratic6),
4862 TEST(testQuadratic5),
4863 TEST(testQuadratic4x),
4864 TEST(testQuadratic3x),
4865 TEST(testQuadratic2x),
4866 TEST(testQuadratic1x),
4867 TEST(testQuadratic4),
4868 TEST(testQuadratic3),
4869 TEST(testQuadratic2),
4870 TEST(testQuadratic1),
4875 TEST(testQuadralateral9x),
4876 TEST(testQuadralateral8x),
4877 TEST(testQuadralateral7x),
4878 TEST(testQuadralateral6x),
4879 TEST(testQuadralateral6ax),
4880 TEST(testQuadralateral9),
4881 TEST(testQuadralateral8),
4882 TEST(testQuadralateral7),
4883 TEST(testQuadralateral6),
4884 TEST(testQuadralateral6a),
4885 TEST(testFauxQuadralateral6dx),
4886 TEST(testFauxQuadralateral6cx),
4887 TEST(testFauxQuadralateral6bx),
4888 TEST(testFauxQuadralateral6ax),
4889 TEST(testFauxQuadralateral6x),
4890 TEST(testFauxQuadralateral6d),
4891 TEST(testFauxQuadralateral6c),
4892 TEST(testFauxQuadralateral6b),
4893 TEST(testFauxQuadralateral6a),
4894 TEST(testFauxQuadralateral6),
4895 TEST(testQuadralateral5x),
4896 TEST(testQuadralateral5),
4897 TEST(testNondegenerate4x),
4898 TEST(testNondegenerate3x),
4899 TEST(testNondegenerate2x),
4900 TEST(testNondegenerate1x),
4901 TEST(testNondegenerate4),
4902 TEST(testNondegenerate3),
4903 TEST(testNondegenerate2),
4904 TEST(testNondegenerate1),
4905 TEST(testDegenerate4x),
4906 TEST(testDegenerate3x),
4907 TEST(testDegenerate2x),
4908 TEST(testDegenerate1x),
4909 TEST(testDegenerate4),
4910 TEST(testDegenerate3),
4911 TEST(testDegenerate2),
4912 TEST(testDegenerate1),
5099 static const size_t testCount = SK_ARRAY_COUNT(tests);
5101 static TestDesc subTests[] = {
5107 static const size_t subTestCount = SK_ARRAY_COUNT(subTests);
5109 static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0;
5111 static bool runSubTests = false;
5112 static bool runSubTestsFirst = false;
5113 static bool runReverse = false;
5114 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
5116 DEF_TEST(PathOpsSimplify, reporter) {
5117 if (runSubTests && runSubTestsFirst) {
5118 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, runReverse);
5120 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse);
5121 if (runSubTests && !runSubTestsFirst) {
5122 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, runReverse);