Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: tests/PathOpsSkpTest.cpp

Issue 463883002: fix pathops skp-derived bugs; add more failing tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/PathOpsSkpClipTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 8
9 #define TEST(name) { name, #name } 9 #define TEST(name) { name, #name }
10 10
(...skipping 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 path.close(); 3564 path.close();
3565 SkPath pathB; 3565 SkPath pathB;
3566 pathB.setFillType(SkPath::kWinding_FillType); 3566 pathB.setFillType(SkPath::kWinding_FillType);
3567 pathB.moveTo(365, 5082); 3567 pathB.moveTo(365, 5082);
3568 pathB.lineTo(365.848175f, 5081.15186f); 3568 pathB.lineTo(365.848175f, 5081.15186f);
3569 pathB.lineTo(368, 5103); 3569 pathB.lineTo(368, 5103);
3570 pathB.lineTo(365, 5106); 3570 pathB.lineTo(365, 5106);
3571 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); 3571 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3572 } 3572 }
3573 3573
3574 #if TEST_NEW_FAILURES
3575 // addTCoincident SkASSERT(test->fT < 1);
3576 static void skpwww_googleventures_com_32(skiatest::Reporter* reporter, const cha r* filename) { 3574 static void skpwww_googleventures_com_32(skiatest::Reporter* reporter, const cha r* filename) {
3577 SkPath path; 3575 SkPath path;
3578 path.setFillType(SkPath::kEvenOdd_FillType); 3576 path.setFillType(SkPath::kEvenOdd_FillType);
3579 path.moveTo(725.911682f, 898.767456f); 3577 path.moveTo(725.911682f, 898.767456f);
3580 path.lineTo(741.232544f, 885.911682f); 3578 path.lineTo(741.232544f, 885.911682f);
3581 path.lineTo(754.088318f, 901.232544f); 3579 path.lineTo(754.088318f, 901.232544f);
3582 path.lineTo(738.767456f, 914.088318f); 3580 path.lineTo(738.767456f, 914.088318f);
3583 path.lineTo(725.911682f, 898.767456f); 3581 path.lineTo(725.911682f, 898.767456f);
3584 path.close(); 3582 path.close();
3585 SkPath pathB; 3583 SkPath pathB;
3586 pathB.setFillType(SkPath::kWinding_FillType); 3584 pathB.setFillType(SkPath::kWinding_FillType);
3587 pathB.moveTo(728.37677f, 870.59082f); 3585 pathB.moveTo(728.37677f, 870.59082f);
3588 pathB.lineTo(754.088257f, 901.232605f); 3586 pathB.lineTo(754.088257f, 901.232605f);
3589 pathB.lineTo(738.767395f, 914.088379f); 3587 pathB.lineTo(738.767395f, 914.088379f);
3590 pathB.lineTo(713.055908f, 883.446594f); 3588 pathB.lineTo(713.055908f, 883.446594f);
3591 pathB.close(); 3589 pathB.close();
3592 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); 3590 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3593 } 3591 }
3594 3592
3595 // checkSmallCoincidence failed assertion "!next->fSmall || checkMultiple" 3593 #if TEST_NEW_FAILURES
3596 static void skpwww_devbridge_com_22(skiatest::Reporter* reporter, const char* fi lename) { 3594 static void skpwww_devbridge_com_22(skiatest::Reporter* reporter, const char* fi lename) {
3597 SkPath path; 3595 SkPath path;
3598 path.setFillType(SkPath::kEvenOdd_FillType); 3596 path.setFillType(SkPath::kEvenOdd_FillType);
3599 path.moveTo(4915, 1523); 3597 path.moveTo(4915, 1523);
3600 path.quadTo(4887.24756f, 1523, 4867.62402f, 1542.6239f); 3598 path.quadTo(4887.24756f, 1523, 4867.62402f, 1542.6239f);
3601 path.quadTo(4848, 1562.24768f, 4848, 1590); 3599 path.quadTo(4848, 1562.24768f, 4848, 1590);
3602 path.quadTo(4848, 1617.75232f, 4867.62402f, 1637.3761f); 3600 path.quadTo(4848, 1617.75232f, 4867.62402f, 1637.3761f);
3603 path.quadTo(4887.24756f, 1657, 4915, 1657); 3601 path.quadTo(4887.24756f, 1657, 4915, 1657);
3604 path.quadTo(4942.75244f, 1657, 4962.37598f, 1637.3761f); 3602 path.quadTo(4942.75244f, 1657, 4962.37598f, 1637.3761f);
3605 path.quadTo(4982, 1617.75232f, 4982, 1590); 3603 path.quadTo(4982, 1617.75232f, 4982, 1590);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
3665 path.lineTo(143, 14557); 3663 path.lineTo(143, 14557);
3666 path.close(); 3664 path.close();
3667 SkPath pathB; 3665 SkPath pathB;
3668 pathB.setFillType(SkPath::kWinding_FillType); 3666 pathB.setFillType(SkPath::kWinding_FillType);
3669 pathB.moveTo(143, 14557); 3667 pathB.moveTo(143, 14557);
3670 pathB.lineTo(143, 14555.9902f); 3668 pathB.lineTo(143, 14555.9902f);
3671 pathB.lineTo(165, 14556); 3669 pathB.lineTo(165, 14556);
3672 pathB.lineTo(165, 14557); 3670 pathB.lineTo(165, 14557);
3673 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); 3671 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3674 } 3672 }
3673 #endif
3675 3674
3676 // addTCancel: failed assertion "oIndex > 0"
3677 static void skpwww_firstunitedbank_com_19(skiatest::Reporter* reporter, const ch ar* filename) { 3675 static void skpwww_firstunitedbank_com_19(skiatest::Reporter* reporter, const ch ar* filename) {
3678 SkPath path; 3676 SkPath path;
3679 path.setFillType(SkPath::kEvenOdd_FillType); 3677 path.setFillType(SkPath::kEvenOdd_FillType);
3680 path.moveTo(808.585815f, 11673.5859f); 3678 path.moveTo(808.585815f, 11673.5859f);
3681 path.quadTo(809.17157f, 11673, 810, 11673); 3679 path.quadTo(809.17157f, 11673, 810, 11673);
3682 path.lineTo(1032, 11673); 3680 path.lineTo(1032, 11673);
3683 path.quadTo(1038.21326f, 11673, 1042.60657f, 11677.3936f); 3681 path.quadTo(1038.21326f, 11673, 1042.60657f, 11677.3936f);
3684 path.quadTo(1047, 11681.7871f, 1047, 11688); 3682 path.quadTo(1047, 11681.7871f, 1047, 11688);
3685 path.quadTo(1047, 11682.2012f, 1042.60657f, 11678.1006f); 3683 path.quadTo(1047, 11682.2012f, 1042.60657f, 11678.1006f);
3686 path.quadTo(1038.21326f, 11674, 1032, 11674); 3684 path.quadTo(1038.21326f, 11674, 1032, 11674);
(...skipping 15 matching lines...) Expand all
3702 path.quadTo(808, 11674.1719f, 808.585815f, 11673.5859f); 3700 path.quadTo(808, 11674.1719f, 808.585815f, 11673.5859f);
3703 path.close(); 3701 path.close();
3704 SkPath pathB; 3702 SkPath pathB;
3705 pathB.setFillType(SkPath::kWinding_FillType); 3703 pathB.setFillType(SkPath::kWinding_FillType);
3706 pathB.moveTo(808, 11703); 3704 pathB.moveTo(808, 11703);
3707 pathB.lineTo(809.5f, 11701.5f); 3705 pathB.lineTo(809.5f, 11701.5f);
3708 pathB.lineTo(1062.91907f, 11687.0811f); 3706 pathB.lineTo(1062.91907f, 11687.0811f);
3709 pathB.lineTo(1047, 11703); 3707 pathB.lineTo(1047, 11703);
3710 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); 3708 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3711 } 3709 }
3712 #endif
3713 3710
3714 // addSimpleAngle: failed assertion "index == count() - 2" 3711 // addSimpleAngle: failed assertion "index == count() - 2"
3715 static void skpwww_shinydemos_com_5(skiatest::Reporter* reporter, const char* fi lename) { 3712 static void skpwww_shinydemos_com_5(skiatest::Reporter* reporter, const char* fi lename) {
3716 SkPath path; 3713 SkPath path;
3717 path.setFillType(SkPath::kEvenOdd_FillType); 3714 path.setFillType(SkPath::kEvenOdd_FillType);
3718 path.moveTo(205.884888f, 648.203857f); 3715 path.moveTo(205.884888f, 648.203857f);
3719 path.lineTo(771.570374f, 82.5183716f); 3716 path.lineTo(771.570374f, 82.5183716f);
3720 path.lineTo(1110.98169f, 421.929626f); 3717 path.lineTo(1110.98169f, 421.929626f);
3721 path.lineTo(545.296143f, 987.615112f); 3718 path.lineTo(545.296143f, 987.615112f);
3722 path.lineTo(205.884888f, 648.203857f); 3719 path.lineTo(205.884888f, 648.203857f);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3757 pathB.lineTo(344.333344f, 1465.66675f); 3754 pathB.lineTo(344.333344f, 1465.66675f);
3758 pathB.cubicTo(344.333344f, 1467.32361f, 342.840942f, 1468.66675f, 341, 1468. 66675f); 3755 pathB.cubicTo(344.333344f, 1467.32361f, 342.840942f, 1468.66675f, 341, 1468. 66675f);
3759 pathB.lineTo(81, 1468.66675f); 3756 pathB.lineTo(81, 1468.66675f);
3760 pathB.cubicTo(79.15905f, 1468.66675f, 77.6666718f, 1467.32361f, 77.6666718f, 1465.66675f); 3757 pathB.cubicTo(79.15905f, 1468.66675f, 77.6666718f, 1467.32361f, 77.6666718f, 1465.66675f);
3761 pathB.lineTo(77.6666718f, 1396.66675f); 3758 pathB.lineTo(77.6666718f, 1396.66675f);
3762 pathB.cubicTo(77.6666718f, 1394.82568f, 79.15905f, 1393.33337f, 81, 1393.333 37f); 3759 pathB.cubicTo(77.6666718f, 1394.82568f, 79.15905f, 1393.33337f, 81, 1393.333 37f);
3763 pathB.close(); 3760 pathB.close();
3764 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); 3761 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3765 } 3762 }
3766 3763
3764 #if TEST_NEW_FAILURES
3765 // SkOpSegment.cpp:3915: failed assertion "otherEnd >= 0"
3766 static void skpwww_shinydemos_com_15(skiatest::Reporter* reporter, const char* f ilename) {
3767 SkPath path;
3768 path.setFillType(SkPath::kEvenOdd_FillType);
3769 path.moveTo(1000, 310.947968f);
3770 path.lineTo(771.570374f, 82.5183716f);
3771 path.lineTo(205.884888f, 648.203857f);
3772 path.lineTo(448.68103f, 891);
3773 path.lineTo(641.911255f, 891);
3774 path.lineTo(1000, 532.911316f);
3775 path.lineTo(1000, 310.947968f);
3776 path.close();
3777 SkPath pathB;
3778 pathB.setFillType(SkPath::kWinding_FillType);
3779 pathB.moveTo(771.570374f, 82.5183716f);
3780 pathB.lineTo(1110.98169f, 421.929626f);
3781 pathB.lineTo(545.296204f, 987.615051f);
3782 pathB.lineTo(205.884949f, 648.203796f);
3783 pathB.close();
3784 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3785 }
3786
3787 // SkOpSegment.cpp:4398: failed assertion "!span->fDone"
3788 static void skpwww_lptemp_com_5(skiatest::Reporter* reporter, const char* filena me) {
3789 SkPath path;
3790 path.setFillType(SkPath::kEvenOdd_FillType);
3791 path.moveTo(78.6429825f, 3150.97632f);
3792 path.quadTo(79.6192932f, 3150, 81.0000076f, 3150);
3793 path.lineTo(341, 3150);
3794 path.quadTo(342.380707f, 3150, 343.357025f, 3150.97632f);
3795 path.quadTo(344.333344f, 3151.95264f, 344.333344f, 3153.33325f);
3796 path.lineTo(344.333344f, 5205.3335f);
3797 path.quadTo(344.333344f, 5206.71436f, 343.357025f, 5207.69092f);
3798 path.quadTo(342.380707f, 5208.66699f, 341, 5208.66699f);
3799 path.lineTo(81.0000076f, 5208.66699f);
3800 path.quadTo(79.6192932f, 5208.66699f, 78.6429825f, 5207.69092f);
3801 path.quadTo(77.6666718f, 5206.71436f, 77.6666718f, 5205.3335f);
3802 path.lineTo(77.6666718f, 3153.33325f);
3803 path.quadTo(77.6666718f, 3151.95264f, 78.6429825f, 3150.97632f);
3804 path.close();
3805 SkPath pathB;
3806 pathB.setFillType(SkPath::kEvenOdd_FillType);
3807 pathB.moveTo(81, 3150);
3808 pathB.lineTo(341, 3150);
3809 pathB.cubicTo(342.840942f, 3150, 344.333344f, 3151.49268f, 344.333344f, 3153 .3335f);
3810 pathB.lineTo(344.333344f, 5205.3335f);
3811 pathB.cubicTo(344.333344f, 5206.99023f, 342.840942f, 5208.3335f, 341, 5208.3 335f);
3812 pathB.lineTo(81, 5208.3335f);
3813 pathB.cubicTo(79.15905f, 5208.3335f, 77.6666718f, 5206.99023f, 77.6666718f, 5205.3335f);
3814 pathB.lineTo(77.6666718f, 3153.3335f);
3815 pathB.cubicTo(77.6666718f, 3151.49268f, 79.15905f, 3150, 81, 3150);
3816 pathB.close();
3817 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
3818 }
3819 #endif
3820
3767 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; 3821 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
3768 3822
3769 static struct TestDesc tests[] = { 3823 static struct TestDesc tests[] = {
3770 TEST(skpwww_lptemp_com_3), 3824 TEST(skpwww_lptemp_com_3),
3771 TEST(skpwww_shinydemos_com_5), 3825 TEST(skpwww_shinydemos_com_5),
3772 #if TEST_NEW_FAILURES 3826 #if TEST_NEW_FAILURES
3827 TEST(skpwww_lptemp_com_5),
3828 TEST(skpwww_shinydemos_com_15),
3773 TEST(skpwww_familysurvivalprotocol_wordpress_com_61), 3829 TEST(skpwww_familysurvivalprotocol_wordpress_com_61),
3774 TEST(skpwww_alamdi_com_3), 3830 TEST(skpwww_alamdi_com_3),
3775 TEST(skpwww_devbridge_com_22), 3831 TEST(skpwww_devbridge_com_22),
3832 #endif
3833 TEST(skpwww_firstunitedbank_com_19),
3776 TEST(skpwww_googleventures_com_32), 3834 TEST(skpwww_googleventures_com_32),
3777 #endif
3778 TEST(skpwww_9to5mac_com_64), 3835 TEST(skpwww_9to5mac_com_64),
3779 TEST(skpwww_wartepop_blogspot_com_br_6), 3836 TEST(skpwww_wartepop_blogspot_com_br_6),
3780 TEST(skpwww_wartepop_blogspot_com_br_6a), 3837 TEST(skpwww_wartepop_blogspot_com_br_6a),
3781 TEST(skpwww_cooksnaps_com_32a), 3838 TEST(skpwww_cooksnaps_com_32a),
3782 TEST(skpwww_argus_presse_fr_41), 3839 TEST(skpwww_argus_presse_fr_41),
3783 TEST(skpwww_cooksnaps_com_17), 3840 TEST(skpwww_cooksnaps_com_17),
3784 TEST(skpwww_cooksnaps_com_32), 3841 TEST(skpwww_cooksnaps_com_32),
3785 TEST(skpwww_kitcheninspirations_wordpress_com_66), 3842 TEST(skpwww_kitcheninspirations_wordpress_com_66),
3786 TEST(skpwww_tcmevents_org_13), 3843 TEST(skpwww_tcmevents_org_13),
3787 TEST(skpwww_narayana_publishers_com_194), 3844 TEST(skpwww_narayana_publishers_com_194),
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
3886 3943
3887 static bool runReverse = false; 3944 static bool runReverse = false;
3888 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; 3945 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
3889 3946
3890 DEF_TEST(PathOpsSkp, reporter) { 3947 DEF_TEST(PathOpsSkp, reporter) {
3891 #if DEBUG_SHOW_TEST_NAME 3948 #if DEBUG_SHOW_TEST_NAME
3892 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); 3949 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH);
3893 #endif 3950 #endif
3894 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); 3951 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse);
3895 } 3952 }
OLDNEW
« no previous file with comments | « tests/PathOpsSkpClipTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698