OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 | 9 |
10 #define TEST(name) { name, #name } | 10 #define TEST(name) { name, #name } |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 path.cubicTo(SkBits2Float(0x4403f333), SkBits2Float(0x42c99d06), SkBits2Float(0x
44042000), SkBits2Float(0x42c99bdf), SkBits2Float(0x44044ccd), SkBits2Float(0x42
c9999a)); // 527.8f, 100.807f, 528.5f, 100.804f, 529.2f, 100.8f | 1087 path.cubicTo(SkBits2Float(0x4403f333), SkBits2Float(0x42c99d06), SkBits2Float(0x
44042000), SkBits2Float(0x42c99bdf), SkBits2Float(0x44044ccd), SkBits2Float(0x42
c9999a)); // 527.8f, 100.807f, 528.5f, 100.804f, 529.2f, 100.8f |
1088 path.lineTo(SkBits2Float(0x44044ccd), SkBits2Float(0x42c9999a)); // 529.2f, 100
.8f | 1088 path.lineTo(SkBits2Float(0x44044ccd), SkBits2Float(0x42c9999a)); // 529.2f, 100
.8f |
1089 path.lineTo(SkBits2Float(0x43dfa666), SkBits2Float(0x42c9999a)); // 447.3f, 100
.8f | 1089 path.lineTo(SkBits2Float(0x43dfa666), SkBits2Float(0x42c9999a)); // 447.3f, 100
.8f |
1090 path.close(); | 1090 path.close(); |
1091 return path; | 1091 return path; |
1092 } | 1092 } |
1093 | 1093 |
1094 static void issue3651_1(skiatest::Reporter* reporter, const char* filename) { | 1094 static void issue3651_1(skiatest::Reporter* reporter, const char* filename) { |
1095 SkPath path = path1(); | 1095 SkPath path = path1(); |
1096 SkPath pathB = path2(); | 1096 SkPath pathB = path2(); |
1097 testPathOp(reporter, path, pathB, SkPathOp::kUnion_SkPathOp, filename); | 1097 testPathOpCheck(reporter, path, pathB, SkPathOp::kUnion_SkPathOp, filename,
FLAGS_runFail); |
1098 } | 1098 } |
1099 | 1099 |
1100 static void issue3651_2(skiatest::Reporter* reporter, const char* filename) { | 1100 static void issue3651_2(skiatest::Reporter* reporter, const char* filename) { |
1101 SkPath path = path3(); | 1101 SkPath path = path3(); |
1102 SkPath pathB = path4(); | 1102 SkPath pathB = path4(); |
1103 testPathOp(reporter, path, pathB, SkPathOp::kUnion_SkPathOp, filename); | 1103 testPathOp(reporter, path, pathB, SkPathOp::kUnion_SkPathOp, filename); |
1104 } | 1104 } |
1105 | 1105 |
1106 static void issue3651_3(skiatest::Reporter* reporter, const char* filename) { | 1106 static void issue3651_3(skiatest::Reporter* reporter, const char* filename) { |
1107 SkPath path = path5(); | 1107 SkPath path = path5(); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 path.lineTo(SkBits2Float(0x43054000), SkBits2Float(0x43346666)); // 133.25f, 18
0.4f | 1274 path.lineTo(SkBits2Float(0x43054000), SkBits2Float(0x43346666)); // 133.25f, 18
0.4f |
1275 path.close(); | 1275 path.close(); |
1276 path.moveTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 18
0.4f | 1276 path.moveTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 18
0.4f |
1277 path.lineTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 18
0.4f | 1277 path.lineTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 18
0.4f |
1278 path.cubicTo(SkBits2Float(0x433b3bbc), SkBits2Float(0x433466f1), SkBits2Float(0x
433beaab), SkBits2Float(0x43346920), SkBits2Float(0x433c999a), SkBits2Float(0x43
3469ab)); // 187.233f, 180.402f, 187.917f, 180.411f, 188.6f, 180.413f | 1278 path.cubicTo(SkBits2Float(0x433b3bbc), SkBits2Float(0x433466f1), SkBits2Float(0x
433beaab), SkBits2Float(0x43346920), SkBits2Float(0x433c999a), SkBits2Float(0x43
3469ab)); // 187.233f, 180.402f, 187.917f, 180.411f, 188.6f, 180.413f |
1279 path.cubicTo(SkBits2Float(0x433d4889), SkBits2Float(0x43346a37), SkBits2Float(0x
433df777), SkBits2Float(0x43346a37), SkBits2Float(0x433ea666), SkBits2Float(0x43
3469ab)); // 189.283f, 180.415f, 189.967f, 180.415f, 190.65f, 180.413f | 1279 path.cubicTo(SkBits2Float(0x433d4889), SkBits2Float(0x43346a37), SkBits2Float(0x
433df777), SkBits2Float(0x43346a37), SkBits2Float(0x433ea666), SkBits2Float(0x43
3469ab)); // 189.283f, 180.415f, 189.967f, 180.415f, 190.65f, 180.413f |
1280 path.cubicTo(SkBits2Float(0x433f5555), SkBits2Float(0x43346920), SkBits2Float(0x
43400444), SkBits2Float(0x433466f1), SkBits2Float(0x4340b333), SkBits2Float(0x43
346666)); // 191.333f, 180.411f, 192.017f, 180.402f, 192.7f, 180.4f | 1280 path.cubicTo(SkBits2Float(0x433f5555), SkBits2Float(0x43346920), SkBits2Float(0x
43400444), SkBits2Float(0x433466f1), SkBits2Float(0x4340b333), SkBits2Float(0x43
346666)); // 191.333f, 180.411f, 192.017f, 180.402f, 192.7f, 180.4f |
1281 path.lineTo(SkBits2Float(0x4340b333), SkBits2Float(0x43346666)); // 192.7f, 180
.4f | 1281 path.lineTo(SkBits2Float(0x4340b333), SkBits2Float(0x43346666)); // 192.7f, 180
.4f |
1282 path.lineTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 18
0.4f | 1282 path.lineTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 18
0.4f |
1283 path.close(); | 1283 path.close(); |
1284 testPathOpCheck(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename,
FLAGS_runFail); | 1284 testPathOp(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename); |
1285 } | 1285 } |
1286 | 1286 |
1287 static void issue3651_5(skiatest::Reporter* reporter, const char* filename) { | 1287 static void issue3651_5(skiatest::Reporter* reporter, const char* filename) { |
1288 SkPath path; | 1288 SkPath path; |
1289 path.moveTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f | 1289 path.moveTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f |
1290 path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f | 1290 path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f |
1291 path.cubicTo(SkBits2Float(0x41300000), SkBits2Float(0x4380b333), SkBits2Float(0x
4141999a), SkBits2Float(0x4380ba9e), SkBits2Float(0x41533333), SkBits2Float(0x43
80b333)); // 11, 257.4f, 12.1f, 257.458f, 13.2f, 257.4f | 1291 path.cubicTo(SkBits2Float(0x41300000), SkBits2Float(0x4380b333), SkBits2Float(0x
4141999a), SkBits2Float(0x4380ba9e), SkBits2Float(0x41533333), SkBits2Float(0x43
80b333)); // 11, 257.4f, 12.1f, 257.458f, 13.2f, 257.4f |
1292 path.cubicTo(SkBits2Float(0x4164cccd), SkBits2Float(0x4380abc8), SkBits2Float(0x
41766666), SkBits2Float(0x43809a93), SkBits2Float(0x41840000), SkBits2Float(0x43
8086b0)); // 14.3f, 257.342f, 15.4f, 257.208f, 16.5f, 257.052f | 1292 path.cubicTo(SkBits2Float(0x4164cccd), SkBits2Float(0x4380abc8), SkBits2Float(0x
41766666), SkBits2Float(0x43809a93), SkBits2Float(0x41840000), SkBits2Float(0x43
8086b0)); // 14.3f, 257.342f, 15.4f, 257.208f, 16.5f, 257.052f |
1293 path.cubicTo(SkBits2Float(0x418ccccd), SkBits2Float(0x438072cc), SkBits2Float(0x
4195999a), SkBits2Float(0x4380498b), SkBits2Float(0x419e6666), SkBits2Float(0x43
803bdc)); // 17.6f, 256.897f, 18.7f, 256.575f, 19.8f, 256.468f | 1293 path.cubicTo(SkBits2Float(0x418ccccd), SkBits2Float(0x438072cc), SkBits2Float(0x
4195999a), SkBits2Float(0x4380498b), SkBits2Float(0x419e6666), SkBits2Float(0x43
803bdc)); // 17.6f, 256.897f, 18.7f, 256.575f, 19.8f, 256.468f |
1294 path.cubicTo(SkBits2Float(0x41a73333), SkBits2Float(0x43802e2d), SkBits2Float(0x
41b00000), SkBits2Float(0x438026f3), SkBits2Float(0x41b8cccd), SkBits2Float(0x43
803498)); // 20.9f, 256.361f, 22, 256.304f, 23.1f, 256.411f | 1294 path.cubicTo(SkBits2Float(0x41a73333), SkBits2Float(0x43802e2d), SkBits2Float(0x
41b00000), SkBits2Float(0x438026f3), SkBits2Float(0x41b8cccd), SkBits2Float(0x43
803498)); // 20.9f, 256.361f, 22, 256.304f, 23.1f, 256.411f |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 path.cubicTo(SkBits2Float(0x427f3333), SkBits2Float(0x43812bda), SkBits2Float(0x
4281cccd), SkBits2Float(0x43811c75), SkBits2Float(0x42840000), SkBits2Float(0x43
81071f)); // 63.8f, 258.343f, 64.9f, 258.222f, 66, 258.056f | 1337 path.cubicTo(SkBits2Float(0x427f3333), SkBits2Float(0x43812bda), SkBits2Float(0x
4281cccd), SkBits2Float(0x43811c75), SkBits2Float(0x42840000), SkBits2Float(0x43
81071f)); // 63.8f, 258.343f, 64.9f, 258.222f, 66, 258.056f |
1338 path.cubicTo(SkBits2Float(0x42863333), SkBits2Float(0x4380f1ca), SkBits2Float(0x
42886666), SkBits2Float(0x4380c130), SkBits2Float(0x428a999a), SkBits2Float(0x43
80b333)); // 67.1f, 257.889f, 68.2f, 257.509f, 69.3f, 257.4f | 1338 path.cubicTo(SkBits2Float(0x42863333), SkBits2Float(0x4380f1ca), SkBits2Float(0x
42886666), SkBits2Float(0x4380c130), SkBits2Float(0x428a999a), SkBits2Float(0x43
80b333)); // 67.1f, 257.889f, 68.2f, 257.509f, 69.3f, 257.4f |
1339 path.cubicTo(SkBits2Float(0x428ccccd), SkBits2Float(0x4380a536), SkBits2Float(0x
428f0000), SkBits2Float(0x4380b333), SkBits2Float(0x42913333), SkBits2Float(0x43
80b333)); // 70.4f, 257.291f, 71.5f, 257.4f, 72.6f, 257.4f | 1339 path.cubicTo(SkBits2Float(0x428ccccd), SkBits2Float(0x4380a536), SkBits2Float(0x
428f0000), SkBits2Float(0x4380b333), SkBits2Float(0x42913333), SkBits2Float(0x43
80b333)); // 70.4f, 257.291f, 71.5f, 257.4f, 72.6f, 257.4f |
1340 path.cubicTo(SkBits2Float(0x42936666), SkBits2Float(0x4380b333), SkBits2Float(0x
4295999a), SkBits2Float(0x4380ab4f), SkBits2Float(0x4297cccd), SkBits2Float(0x43
80b333)); // 73.7f, 257.4f, 74.8f, 257.338f, 75.9f, 257.4f | 1340 path.cubicTo(SkBits2Float(0x42936666), SkBits2Float(0x4380b333), SkBits2Float(0x
4295999a), SkBits2Float(0x4380ab4f), SkBits2Float(0x4297cccd), SkBits2Float(0x43
80b333)); // 73.7f, 257.4f, 74.8f, 257.338f, 75.9f, 257.4f |
1341 path.cubicTo(SkBits2Float(0x429a0000), SkBits2Float(0x4380bb16), SkBits2Float(0x
429c3333), SkBits2Float(0x4380e287), SkBits2Float(0x429e6666), SkBits2Float(0x43
80e287)); // 77, 257.462f, 78.1f, 257.77f, 79.2f, 257.77f | 1341 path.cubicTo(SkBits2Float(0x429a0000), SkBits2Float(0x4380bb16), SkBits2Float(0x
429c3333), SkBits2Float(0x4380e287), SkBits2Float(0x429e6666), SkBits2Float(0x43
80e287)); // 77, 257.462f, 78.1f, 257.77f, 79.2f, 257.77f |
1342 path.cubicTo(SkBits2Float(0x42a0999a), SkBits2Float(0x4380e287), SkBits2Float(0x
42a2cccd), SkBits2Float(0x4380bb16), SkBits2Float(0x42a50000), SkBits2Float(0x43
80b333)); // 80.3f, 257.77f, 81.4f, 257.462f, 82.5f, 257.4f | 1342 path.cubicTo(SkBits2Float(0x42a0999a), SkBits2Float(0x4380e287), SkBits2Float(0x
42a2cccd), SkBits2Float(0x4380bb16), SkBits2Float(0x42a50000), SkBits2Float(0x43
80b333)); // 80.3f, 257.77f, 81.4f, 257.462f, 82.5f, 257.4f |
1343 path.cubicTo(SkBits2Float(0x42a73333), SkBits2Float(0x4380ab4f), SkBits2Float(0x
42a96666), SkBits2Float(0x4380b333), SkBits2Float(0x42ab999a), SkBits2Float(0x43
80b333)); // 83.6f, 257.338f, 84.7f, 257.4f, 85.8f, 257.4f | 1343 path.cubicTo(SkBits2Float(0x42a73333), SkBits2Float(0x4380ab4f), SkBits2Float(0x
42a96666), SkBits2Float(0x4380b333), SkBits2Float(0x42ab999a), SkBits2Float(0x43
80b333)); // 83.6f, 257.338f, 84.7f, 257.4f, 85.8f, 257.4f |
1344 path.lineTo(SkBits2Float(0x42ab999a), SkBits2Float(0x4380b333)); // 85.8f, 257.
4f | 1344 path.lineTo(SkBits2Float(0x42ab999a), SkBits2Float(0x4380b333)); // 85.8f, 257.
4f |
1345 path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f | 1345 path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f |
1346 path.close(); | 1346 path.close(); |
1347 testPathOpCheck(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename,
FLAGS_runFail); | 1347 testPathOp(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename); |
1348 } | 1348 } |
1349 | 1349 |
1350 static void issue3651_6(skiatest::Reporter* reporter, const char* filename) { | 1350 static void issue3651_6(skiatest::Reporter* reporter, const char* filename) { |
1351 SkPath path; | 1351 SkPath path; |
1352 path.cubicTo(SkBits2Float(0x41c1999a), SkBits2Float(0x4380423d), SkBits2Float(0x
41ca6666), SkBits2Float(0x4380789f), SkBits2Float(0x41d33333), SkBits2Float(0x43
808db9)); // 24.2f, 256.517f, 25.3f, 256.942f, 26.4f, 257.107f | 1352 path.cubicTo(SkBits2Float(0x41c1999a), SkBits2Float(0x4380423d), SkBits2Float(0x
41ca6666), SkBits2Float(0x4380789f), SkBits2Float(0x41d33333), SkBits2Float(0x43
808db9)); // 24.2f, 256.517f, 25.3f, 256.942f, 26.4f, 257.107f |
1353 path.cubicTo(SkBits2Float(0x41dc0000), SkBits2Float(0x4380a2d3), SkBits2Float(0x
41e4cccd), SkBits2Float(0x4380b36f), SkBits2Float(0x41ed999a), SkBits2Float(0x43
80b333)); // 27.5f, 257.272f, 28.6f, 257.402f, 29.7f, 257.4f | 1353 path.cubicTo(SkBits2Float(0x41dc0000), SkBits2Float(0x4380a2d3), SkBits2Float(0x
41e4cccd), SkBits2Float(0x4380b36f), SkBits2Float(0x41ed999a), SkBits2Float(0x43
80b333)); // 27.5f, 257.272f, 28.6f, 257.402f, 29.7f, 257.4f |
1354 path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f | 1354 path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4
f |
1355 path.close(); | 1355 path.close(); |
1356 SkPath pathA = path; | 1356 SkPath pathA = path; |
1357 path.reset(); | 1357 path.reset(); |
(...skipping 19 matching lines...) Expand all Loading... |
1377 static const size_t testCount = SK_ARRAY_COUNT(tests); | 1377 static const size_t testCount = SK_ARRAY_COUNT(tests); |
1378 | 1378 |
1379 static bool runReverse = false; | 1379 static bool runReverse = false; |
1380 | 1380 |
1381 DEF_TEST(PathOpsIssue3651, reporter) { | 1381 DEF_TEST(PathOpsIssue3651, reporter) { |
1382 #if DEBUG_SHOW_TEST_NAME | 1382 #if DEBUG_SHOW_TEST_NAME |
1383 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 1383 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
1384 #endif | 1384 #endif |
1385 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 1385 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
1386 } | 1386 } |
OLD | NEW |