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 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 path.moveTo(0,1); | 1336 path.moveTo(0,1); |
1337 path.cubicTo(0,5, 4,0, 5,0); | 1337 path.cubicTo(0,5, 4,0, 5,0); |
1338 path.close(); | 1338 path.close(); |
1339 pathB.setFillType(SkPath::kWinding_FillType); | 1339 pathB.setFillType(SkPath::kWinding_FillType); |
1340 pathB.moveTo(0,4); | 1340 pathB.moveTo(0,4); |
1341 pathB.cubicTo(0,5, 1,0, 5,0); | 1341 pathB.cubicTo(0,5, 1,0, 5,0); |
1342 pathB.close(); | 1342 pathB.close(); |
1343 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1343 testPathOp(reporter, path, pathB, kDifference_PathOp); |
1344 } | 1344 } |
1345 | 1345 |
| 1346 static void cubicOp71d(skiatest::Reporter* reporter) { |
| 1347 SkPath path, pathB; |
| 1348 path.setFillType(SkPath::kWinding_FillType); |
| 1349 path.moveTo(0,1); |
| 1350 path.cubicTo(0,5, 4,1, 6,4); |
| 1351 path.close(); |
| 1352 pathB.setFillType(SkPath::kWinding_FillType); |
| 1353 pathB.moveTo(1,4); |
| 1354 pathB.cubicTo(4,6, 1,0, 5,0); |
| 1355 pathB.close(); |
| 1356 testPathOp(reporter, path, pathB, kDifference_PathOp); |
| 1357 } |
| 1358 |
1346 static void (*firstTest)(skiatest::Reporter* ) = 0; | 1359 static void (*firstTest)(skiatest::Reporter* ) = 0; |
1347 | 1360 |
1348 static struct TestDesc tests[] = { | 1361 static struct TestDesc tests[] = { |
| 1362 TEST(cubicOp71d), |
1349 TEST(skp5), | 1363 TEST(skp5), |
1350 TEST(skp4), | 1364 TEST(skp4), |
1351 TEST(skp3), | 1365 TEST(skp3), |
1352 TEST(skp2), | 1366 TEST(skp2), |
1353 TEST(skp1), | 1367 TEST(skp1), |
1354 TEST(rRect1), | 1368 TEST(rRect1), |
1355 TEST(cubicOp70d), | 1369 TEST(cubicOp70d), |
1356 TEST(cubicOp69d), | 1370 TEST(cubicOp69d), |
1357 TEST(cubicOp68u), | 1371 TEST(cubicOp68u), |
1358 TEST(cubicOp67u), | 1372 TEST(cubicOp67u), |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 1493 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
1480 } | 1494 } |
1481 #ifdef SK_DEBUG | 1495 #ifdef SK_DEBUG |
1482 gDebugMaxWindSum = SK_MaxS32; | 1496 gDebugMaxWindSum = SK_MaxS32; |
1483 gDebugMaxWindValue = SK_MaxS32; | 1497 gDebugMaxWindValue = SK_MaxS32; |
1484 #endif | 1498 #endif |
1485 } | 1499 } |
1486 | 1500 |
1487 #include "TestClassDef.h" | 1501 #include "TestClassDef.h" |
1488 DEFINE_TESTCLASS_SHORT(PathOpsOpTest) | 1502 DEFINE_TESTCLASS_SHORT(PathOpsOpTest) |
OLD | NEW |