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 |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 pathB.lineTo(1215, 183); | 1083 pathB.lineTo(1215, 183); |
1084 pathB.lineTo(1215, 202); | 1084 pathB.lineTo(1215, 202); |
1085 pathB.cubicTo(1215, 204.761429f, 1212.76147f, 207, 1210, 207); | 1085 pathB.cubicTo(1215, 204.761429f, 1212.76147f, 207, 1210, 207); |
1086 pathB.lineTo(55, 207); | 1086 pathB.lineTo(55, 207); |
1087 pathB.cubicTo(52.238575f, 207, 50, 204.761429f, 50, 202); | 1087 pathB.cubicTo(52.238575f, 207, 50, 204.761429f, 50, 202); |
1088 pathB.lineTo(50, 183); | 1088 pathB.lineTo(50, 183); |
1089 pathB.close(); | 1089 pathB.close(); |
1090 // FIXME: this generates quads and cubics that are (correctly) not coinciden
t unlike the old code | 1090 // FIXME: this generates quads and cubics that are (correctly) not coinciden
t unlike the old code |
1091 // however, somewhere the angles are sorted incorrectly and the winding is c
omputed to be -1/-2 | 1091 // however, somewhere the angles are sorted incorrectly and the winding is c
omputed to be -1/-2 |
1092 // but I can't find the error | 1092 // but I can't find the error |
1093 testPathOpCheck(reporter, path, pathB, kIntersect_SkPathOp, filename, FLAGS_
runFail); | 1093 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1094 } | 1094 } |
1095 | 1095 |
1096 static void skpwww_fj_p_com_22(skiatest::Reporter* reporter, const char* filenam
e) { | 1096 static void skpwww_fj_p_com_22(skiatest::Reporter* reporter, const char* filenam
e) { |
1097 SkPath path; | 1097 SkPath path; |
1098 path.setFillType(SkPath::kEvenOdd_FillType); | 1098 path.setFillType(SkPath::kEvenOdd_FillType); |
1099 path.moveTo(172, 201); | 1099 path.moveTo(172, 201); |
1100 path.lineTo(172, 202); | 1100 path.lineTo(172, 202); |
1101 path.lineTo(220, 202); | 1101 path.lineTo(220, 202); |
1102 path.cubicTo(221.65686f, 202, 223, 200.65686f, 223, 199); | 1102 path.cubicTo(221.65686f, 202, 223, 200.65686f, 223, 199); |
1103 path.cubicTo(223, 200.104568f, 221.65686f, 201, 220, 201); | 1103 path.cubicTo(223, 200.104568f, 221.65686f, 201, 220, 201); |
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3762 pathB.moveTo(984.546021f, 1478.31494f); | 3762 pathB.moveTo(984.546021f, 1478.31494f); |
3763 pathB.cubicTo(984.546021f, 1478.31494f, 984.543213f, 1478.32239f, 984.537598f, 1
478.33655f); | 3763 pathB.cubicTo(984.546021f, 1478.31494f, 984.543213f, 1478.32239f, 984.537598f, 1
478.33655f); |
3764 pathB.cubicTo(984.419006f, 1478.63477f, 983.044373f, 1481.90405f, 980.026001f, 1
481.276f); | 3764 pathB.cubicTo(984.419006f, 1478.63477f, 983.044373f, 1481.90405f, 980.026001f, 1
481.276f); |
3765 pathB.cubicTo(980.026001f, 1481.276f, 980.02594f, 1481.27576f, 980.025879f, 1481
.27527f); | 3765 pathB.cubicTo(980.026001f, 1481.276f, 980.02594f, 1481.27576f, 980.025879f, 1481
.27527f); |
3766 pathB.cubicTo(980.018494f, 1481.22131f, 979.602478f, 1478.38831f, 984.546021f, 1
478.31494f); | 3766 pathB.cubicTo(980.018494f, 1481.22131f, 979.602478f, 1478.38831f, 984.546021f, 1
478.31494f); |
3767 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); | 3767 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3768 | 3768 |
3769 } | 3769 } |
3770 | 3770 |
3771 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 3771 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
3772 static void (*firstTest)(skiatest::Reporter* , const char* filename) = skpwww_ma
crumors_com_131; | 3772 static void (*firstTest)(skiatest::Reporter* , const char* filename) = skpwww_co
oksnaps_com_32; |
3773 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 3773 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
3774 | 3774 |
3775 static struct TestDesc tests[] = { | 3775 static struct TestDesc tests[] = { |
3776 TEST(skpwww_educationalcraft_com_4a), | 3776 TEST(skpwww_educationalcraft_com_4a), |
3777 TEST(skpwww_lptemp_com_3), | 3777 TEST(skpwww_lptemp_com_3), |
3778 TEST(skpwww_shinydemos_com_5), | 3778 TEST(skpwww_shinydemos_com_5), |
3779 TEST(skpwww_lptemp_com_5), | 3779 TEST(skpwww_lptemp_com_5), |
3780 TEST(skpwww_shinydemos_com_15), | 3780 TEST(skpwww_shinydemos_com_15), |
3781 TEST(skpwww_familysurvivalprotocol_wordpress_com_61), | 3781 TEST(skpwww_familysurvivalprotocol_wordpress_com_61), |
3782 TEST(skpwww_alamdi_com_3), | 3782 TEST(skpwww_alamdi_com_3), |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3893 static const size_t testCount = SK_ARRAY_COUNT(tests); | 3893 static const size_t testCount = SK_ARRAY_COUNT(tests); |
3894 | 3894 |
3895 static bool runReverse = false; | 3895 static bool runReverse = false; |
3896 | 3896 |
3897 DEF_TEST(PathOpsSkp, reporter) { | 3897 DEF_TEST(PathOpsSkp, reporter) { |
3898 #if DEBUG_SHOW_TEST_NAME | 3898 #if DEBUG_SHOW_TEST_NAME |
3899 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 3899 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
3900 #endif | 3900 #endif |
3901 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 3901 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
3902 } | 3902 } |
OLD | NEW |