OLD | NEW |
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 |
11 #define TRY_NEW_TESTS 0 | |
12 | |
13 static void skpcheeseandburger_com225(skiatest::Reporter* reporter, const char*
filename) { | 11 static void skpcheeseandburger_com225(skiatest::Reporter* reporter, const char*
filename) { |
14 SkPath path; | 12 SkPath path; |
15 path.setFillType(SkPath::kEvenOdd_FillType); | 13 path.setFillType(SkPath::kEvenOdd_FillType); |
16 path.moveTo(555, 468); | 14 path.moveTo(555, 468); |
17 path.lineTo(555, 362); | 15 path.lineTo(555, 362); |
18 path.lineTo(872, 362); | 16 path.lineTo(872, 362); |
19 path.lineTo(872, 468); | 17 path.lineTo(872, 468); |
20 path.lineTo(555, 468); | 18 path.lineTo(555, 468); |
21 path.close(); | 19 path.close(); |
22 SkPath pathB; | 20 SkPath pathB; |
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 path.close(); | 1799 path.close(); |
1802 SkPath pathB; | 1800 SkPath pathB; |
1803 pathB.setFillType(SkPath::kWinding_FillType); | 1801 pathB.setFillType(SkPath::kWinding_FillType); |
1804 pathB.moveTo(741, 9433); | 1802 pathB.moveTo(741, 9433); |
1805 pathB.lineTo(741, 9431.99023f); | 1803 pathB.lineTo(741, 9431.99023f); |
1806 pathB.lineTo(761, 9432); | 1804 pathB.lineTo(761, 9432); |
1807 pathB.lineTo(761, 9433); | 1805 pathB.lineTo(761, 9433); |
1808 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1806 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1809 } | 1807 } |
1810 | 1808 |
1811 #if TRY_NEW_TESTS | |
1812 static void skpwww_argus_presse_fr_41(skiatest::Reporter* reporter, const char*
filename) { | 1809 static void skpwww_argus_presse_fr_41(skiatest::Reporter* reporter, const char*
filename) { |
1813 SkPath path; | 1810 SkPath path; |
1814 path.setFillType(SkPath::kEvenOdd_FillType); | 1811 path.setFillType(SkPath::kEvenOdd_FillType); |
1815 path.moveTo(1000, 343); | 1812 path.moveTo(1000, 343); |
1816 path.lineTo(165, 343); | 1813 path.lineTo(165, 343); |
1817 path.lineTo(165, 364.869873f); | 1814 path.lineTo(165, 364.869873f); |
1818 path.lineTo(1000, 364.869873f); | 1815 path.lineTo(1000, 364.869873f); |
1819 path.lineTo(1000, 343); | 1816 path.lineTo(1000, 343); |
1820 path.close(); | 1817 path.close(); |
1821 SkPath pathB; | 1818 SkPath pathB; |
1822 pathB.setFillType(SkPath::kWinding_FillType); | 1819 pathB.setFillType(SkPath::kWinding_FillType); |
1823 pathB.moveTo(165, 343.000031f); | 1820 pathB.moveTo(165, 343.000031f); |
1824 pathB.lineTo(1000, 343.000031f); | 1821 pathB.lineTo(1000, 343.000031f); |
1825 pathB.lineTo(1000, 364.869904f); | 1822 pathB.lineTo(1000, 364.869904f); |
1826 pathB.lineTo(165, 364.869904f); | 1823 pathB.lineTo(165, 364.869904f); |
1827 pathB.close(); | 1824 pathB.close(); |
1828 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1825 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1829 } | 1826 } |
1830 #endif | |
1831 | 1827 |
1832 // SkOpSegment::checkSmallCoincidence; line 1958 SkASSERT(span.fWindValue); | 1828 // SkOpSegment::checkSmallCoincidence; line 1958 SkASSERT(span.fWindValue); |
1833 static void skpwww_320kbps_net_2231(skiatest::Reporter* reporter, const char* fi
lename) { | 1829 static void skpwww_320kbps_net_2231(skiatest::Reporter* reporter, const char* fi
lename) { |
1834 SkPath path; | 1830 SkPath path; |
1835 path.setFillType(SkPath::kEvenOdd_FillType); | 1831 path.setFillType(SkPath::kEvenOdd_FillType); |
1836 path.moveTo(838, 9125); | 1832 path.moveTo(838, 9125); |
1837 path.lineTo(862, 9124.99023f); | 1833 path.lineTo(862, 9124.99023f); |
1838 path.lineTo(862, 9126); | 1834 path.lineTo(862, 9126); |
1839 path.lineTo(838, 9126); | 1835 path.lineTo(838, 9126); |
1840 path.lineTo(838, 9125); | 1836 path.lineTo(838, 9125); |
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 pathB.lineTo(813, 785); | 3546 pathB.lineTo(813, 785); |
3551 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3547 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
3552 } | 3548 } |
3553 | 3549 |
3554 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 3550 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
3555 | 3551 |
3556 static struct TestDesc tests[] = { | 3552 static struct TestDesc tests[] = { |
3557 TEST(skpwww_wartepop_blogspot_com_br_6), | 3553 TEST(skpwww_wartepop_blogspot_com_br_6), |
3558 TEST(skpwww_wartepop_blogspot_com_br_6a), | 3554 TEST(skpwww_wartepop_blogspot_com_br_6a), |
3559 TEST(skpwww_cooksnaps_com_32a), | 3555 TEST(skpwww_cooksnaps_com_32a), |
3560 #if TRY_NEW_TESTS | |
3561 TEST(skpwww_argus_presse_fr_41), | 3556 TEST(skpwww_argus_presse_fr_41), |
3562 #endif | |
3563 TEST(skpwww_cooksnaps_com_17), | 3557 TEST(skpwww_cooksnaps_com_17), |
3564 TEST(skpwww_cooksnaps_com_32), | 3558 TEST(skpwww_cooksnaps_com_32), |
3565 TEST(skpwww_kitcheninspirations_wordpress_com_66), | 3559 TEST(skpwww_kitcheninspirations_wordpress_com_66), |
3566 TEST(skpwww_tcmevents_org_13), | 3560 TEST(skpwww_tcmevents_org_13), |
3567 TEST(skpwww_narayana_publishers_com_194), | 3561 TEST(skpwww_narayana_publishers_com_194), |
3568 TEST(skpwww_swapspacesystems_com_5), | 3562 TEST(skpwww_swapspacesystems_com_5), |
3569 TEST(skpwww_vantageproduction_com_109), | 3563 TEST(skpwww_vantageproduction_com_109), |
3570 TEST(skpwww_americascup_com_108), | 3564 TEST(skpwww_americascup_com_108), |
3571 TEST(skpwww_narayana_verlag_de_194), | 3565 TEST(skpwww_narayana_verlag_de_194), |
3572 TEST(skpwww_etiqadd_com_2464), | 3566 TEST(skpwww_etiqadd_com_2464), |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3666 | 3660 |
3667 static bool runReverse = false; | 3661 static bool runReverse = false; |
3668 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 3662 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
3669 | 3663 |
3670 DEF_TEST(PathOpsSkp, reporter) { | 3664 DEF_TEST(PathOpsSkp, reporter) { |
3671 #if DEBUG_SHOW_TEST_NAME | 3665 #if DEBUG_SHOW_TEST_NAME |
3672 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 3666 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
3673 #endif | 3667 #endif |
3674 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); | 3668 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); |
3675 } | 3669 } |
OLD | NEW |