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 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 | 9 |
10 class PathTest_Private { | 10 class PathTest_Private { |
(...skipping 7414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7425 path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x432a2928), SkBits2Float(0x
96812be6), SkBits2Float(0x272a1d2a), SkBits2Float(0x3a2a3529), SkBits2Float(0x3b
1e2ab0)); // 0.00148109f, 170.161f, -2.08688e-25f, 2.3608e-15f, 0.000649291f, 0
.00241343f | 7425 path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x432a2928), SkBits2Float(0x
96812be6), SkBits2Float(0x272a1d2a), SkBits2Float(0x3a2a3529), SkBits2Float(0x3b
1e2ab0)); // 0.00148109f, 170.161f, -2.08688e-25f, 2.3608e-15f, 0.000649291f, 0
.00241343f |
7426 path.lineTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f
, 4.61198e-19f | 7426 path.lineTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f
, 4.61198e-19f |
7427 path.close(); | 7427 path.close(); |
7428 path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f
, 4.61198e-19f | 7428 path.moveTo(SkBits2Float(0x212c685b), SkBits2Float(0x21081f2a)); // 5.8414e-19f
, 4.61198e-19f |
7429 path.cubicTo(SkBits2Float(0xc5272927), SkBits2Float(0x22383b39), SkBits2Float(0x
1051523a), SkBits2Float(0x2927b029), SkBits2Float(0x685b2d27), SkBits2Float(0x5b
2d6855)); // -2674.57f, 2.4968e-18f, 4.12813e-29f, 3.72342e-14f, 4.14012e+24f,
4.88099e+16f | 7429 path.cubicTo(SkBits2Float(0xc5272927), SkBits2Float(0x22383b39), SkBits2Float(0x
1051523a), SkBits2Float(0x2927b029), SkBits2Float(0x685b2d27), SkBits2Float(0x5b
2d6855)); // -2674.57f, 2.4968e-18f, 4.12813e-29f, 3.72342e-14f, 4.14012e+24f,
4.88099e+16f |
7430 | 7430 |
7431 SkPath path2(path); | 7431 SkPath path2(path); |
7432 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); | 7432 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); |
7433 } | 7433 } |
7434 | 7434 |
| 7435 static void fuzz763_33(skiatest::Reporter* reporter, const char* filename) { |
| 7436 SkPath path; |
| 7437 path.setFillType((SkPath::FillType) 1); |
| 7438 path.moveTo(SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 7.66623e+30
f, 7.66608e+30f |
| 7439 path.quadTo(SkBits2Float(0x724341bf), SkBits2Float(0x72433fc4), SkBits2Float(0x6
d757575), SkBits2Float(0x6d6d6d6d)); // 3.86746e+30f, 3.86731e+30f, 4.74786e+27
f, 4.59251e+27f |
| 7440 path.cubicTo(SkBits2Float(0x6d18b5e5), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x
6cbe03bd), SkBits2Float(0x6d4b455b), SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d
20df31)); // 2.95385e+27f, 4.59251e+27f, 1.83771e+27f, 3.93183e+27f, 1.14323e+2
7f, 3.11171e+27f |
| 7441 path.conicTo(SkBits2Float(0x6c6c8b72), SkBits2Float(0x00000000), SkBits2Float(0x
6c6c6c6c), SkBits2Float(0x00000000), SkBits2Float(0x400812df)); // 1.14386e+27f
, 0, 1.14327e+27f, 0, 2.12615f |
| 7442 path.quadTo(SkBits2Float(0x72432acb), SkBits2Float(0x72432295), SkBits2Float(0x7
2c185d5), SkBits2Float(0x72c184e8)); // 3.86568e+30f, 3.86505e+30f, 7.66623e+30
f, 7.66608e+30f |
| 7443 path.close(); |
| 7444 path.moveTo(SkBits2Float(0x72c185d5), SkBits2Float(0x72c184e8)); // 7.66623e+30
f, 7.66608e+30f |
| 7445 path.cubicTo(SkBits2Float(0x74f97d76), SkBits2Float(0x74f97d90), SkBits2Float(0x
75381628), SkBits2Float(0x7538182c), SkBits2Float(0x7538153b), SkBits2Float(0x75
381835)); // 1.58133e+32f, 1.58133e+32f, 2.33357e+32f, 2.33367e+32f, 2.33353e+3
2f, 2.33368e+32f |
| 7446 path.cubicTo(SkBits2Float(0x7538144e), SkBits2Float(0x7538183f), SkBits2Float(0x
74f9760f), SkBits2Float(0x74f97ddd), SkBits2Float(0x72c185d5), SkBits2Float(0x72
c184e8)); // 2.33348e+32f, 2.33368e+32f, 1.58115e+32f, 1.58134e+32f, 7.66623e+3
0f, 7.66608e+30f |
| 7447 path.close(); |
| 7448 path.moveTo(SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d20df31)); // 1.14323e+27
f, 3.11171e+27f |
| 7449 path.conicTo(SkBits2Float(0x6c6c55ae), SkBits2Float(0x6d80b520), SkBits2Float(0x
6c6c1071), SkBits2Float(0x6e0f1d6c), SkBits2Float(0x3f96e656)); // 1.14284e+27f
, 4.97913e+27f, 1.14154e+27f, 1.1073e+28f, 1.1789f |
| 7450 path.lineTo(SkBits2Float(0x6a674231), SkBits2Float(0x6c0c3394)); // 6.98936e+25
f, 6.77973e+26f |
| 7451 path.cubicTo(SkBits2Float(0x6b12c63f), SkBits2Float(0x6c881439), SkBits2Float(0x
6bba4ae5), SkBits2Float(0x6ced1e23), SkBits2Float(0x6c6c69d8), SkBits2Float(0x6d
20df31)); // 1.77439e+26f, 1.31608e+27f, 4.50428e+26f, 2.29326e+27f, 1.14323e+2
7f, 3.11171e+27f |
| 7452 path.close(); |
| 7453 |
| 7454 SkPath path1(path); |
| 7455 path.reset(); |
| 7456 path.setFillType((SkPath::FillType) 0); |
| 7457 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7458 path.lineTo(SkBits2Float(0x6c6b6ba7), SkBits2Float(0x886b6b6b)); // 1.13842e+27
f, -7.0844e-34f |
| 7459 path.quadTo(SkBits2Float(0x0000206b), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6
d6d6d6d), SkBits2Float(0x6d6d6d6d)); // 1.16294e-41f, 4.59251e+27f, 4.59251e+27
f, 4.59251e+27f |
| 7460 path.conicTo(SkBits2Float(0x3e3e3e3e), SkBits2Float(0xafbcad20), SkBits2Float(0x
78787878), SkBits2Float(0x78787829), SkBits2Float(0x78787878)); // 0.185784f, -
3.432e-10f, 2.01583e+34f, 2.01582e+34f, 2.01583e+34f |
| 7461 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x95066b78)); // 2.01583e+34
f, -2.71459e-26f |
| 7462 path.lineTo(SkBits2Float(0x6c6b6ba7), SkBits2Float(0x886b6b6b)); // 1.13842e+27
f, -7.0844e-34f |
| 7463 path.quadTo(SkBits2Float(0x0000206b), SkBits2Float(0x6d6d6d6d), SkBits2Float(0x6
d6d6d6d), SkBits2Float(0x6d6d6d6d)); // 1.16294e-41f, 4.59251e+27f, 4.59251e+27
f, 4.59251e+27f |
| 7464 path.conicTo(SkBits2Float(0x3e3e3e3e), SkBits2Float(0xafbcad20), SkBits2Float(0x
78787878), SkBits2Float(0x78787829), SkBits2Float(0x78787878)); // 0.185784f, -
3.432e-10f, 2.01583e+34f, 2.01582e+34f, 2.01583e+34f |
| 7465 path.lineTo(SkBits2Float(0x8787878f), SkBits2Float(0x87878787)); // -2.03922e-3
4f, -2.03922e-34f |
| 7466 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34
f, 2.01583e+34f |
| 7467 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34
f, 2.01583e+34f |
| 7468 path.lineTo(SkBits2Float(0x6c105778), SkBits2Float(0x6d406b64)); // 6.97994e+26
f, 3.72193e+27f |
| 7469 path.cubicTo(SkBits2Float(0x7575756d), SkBits2Float(0x75757575), SkBits2Float(0x
75757575), SkBits2Float(0x75757575), SkBits2Float(0x6d6d7575), SkBits2Float(0x6d
6d6d6d)); // 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 4.59312e+2
7f, 4.59251e+27f |
| 7470 path.cubicTo(SkBits2Float(0x6d696d6d), SkBits2Float(0x026d6d6d), SkBits2Float(0x
80bc6b6b), SkBits2Float(0xaebcdfd0), SkBits2Float(0x7878bcac), SkBits2Float(0x78
787878)); // 4.51514e+27f, 1.74434e-37f, -1.73036e-38f, -8.58901e-11f, 2.01799e
+34f, 2.01583e+34f |
| 7471 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34
f, 2.01583e+34f |
| 7472 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34
f, 2.01583e+34f |
| 7473 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x78787878)); // 2.01583e+34
f, 2.01583e+34f |
| 7474 path.lineTo(SkBits2Float(0xb4bcacbc), SkBits2Float(0xbcadbcbc)); // -3.51434e-0
7f, -0.0212082f |
| 7475 path.moveTo(SkBits2Float(0xa03aacbc), SkBits2Float(0x757575a0)); // -1.5812e-19
f, 3.11157e+32f |
| 7476 path.close(); |
| 7477 |
| 7478 SkPath path2(path); |
| 7479 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); |
| 7480 } |
| 7481 |
| 7482 static void fuzz763_32(skiatest::Reporter* reporter, const char* filename) { |
| 7483 SkPath path; |
| 7484 path.setFillType((SkPath::FillType) 1); |
| 7485 |
| 7486 SkPath path1(path); |
| 7487 path.reset(); |
| 7488 path.setFillType((SkPath::FillType) 0); |
| 7489 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7490 path.cubicTo(SkBits2Float(0xdedcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0x
dcdcdcdc), SkBits2Float(0xdcdcdcdc), SkBits2Float(0x55dcdcdc), SkBits2Float(0x29
407d7f)); // -7.95742e+18f, -4.97339e+17f, -4.97339e+17f, -4.97339e+17f, 3.0355
1e+13f, 4.27414e-14f |
| 7491 path.cubicTo(SkBits2Float(0x7b93ed4b), SkBits2Float(0x29521472), SkBits2Float(0x
dfc83c28), SkBits2Float(0x1a3a834e), SkBits2Float(0x6855e84f), SkBits2Float(0xf2
f22a80)); // 1.53616e+36f, 4.66471e-14f, -2.88569e+19f, 3.857e-23f, 4.0406e+24f
, -9.59318e+30f |
| 7492 path.moveTo(SkBits2Float(0xe0f2f210), SkBits2Float(0xc3f2eef2)); // -1.40049e+2
0f, -485.867f |
| 7493 path.cubicTo(SkBits2Float(0x108ced7a), SkBits2Float(0x7bc00308), SkBits2Float(0x
287a6a3a), SkBits2Float(0x242847ed), SkBits2Float(0x2bcb302a), SkBits2Float(0xf2
1003e8)); // 5.55862e-29f, 1.99396e+36f, 1.39008e-14f, 3.64901e-17f, 1.44374e-1
2f, -2.85252e+30f |
| 7494 path.moveTo(SkBits2Float(0x556c0010), SkBits2Float(0x002a8768)); // 1.62178e+13
f, 3.90567e-39f |
| 7495 path.quadTo(SkBits2Float(0xf2f22021), SkBits2Float(0xf2f2f56e), SkBits2Float(0xf
2f2f2f2), SkBits2Float(0xf22040d9)); // -9.59158e+30f, -9.62459e+30f, -9.6242e+
30f, -3.17414e+30f |
| 7496 path.lineTo(SkBits2Float(0xc013f2f2), SkBits2Float(0x0000294d)); // -2.3117f, 1
.48159e-41f |
| 7497 |
| 7498 SkPath path2(path); |
| 7499 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); |
| 7500 } |
| 7501 |
| 7502 static void fuzz763_34(skiatest::Reporter* reporter, const char* filename) { |
| 7503 SkPath path; |
| 7504 path.setFillType((SkPath::FillType) 1); |
| 7505 path.moveTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21
f, 1.94304e+27f |
| 7506 path.quadTo(SkBits2Float(0x63690f37), SkBits2Float(0x6d0a3d9b), SkBits2Float(0x0
0000000), SkBits2Float(0x6d3e3e3e)); // 4.29919e+21f, 2.67396e+27f, 0, 3.67984e
+27f |
| 7507 path.conicTo(SkBits2Float(0x6b9253fc), SkBits2Float(0x6c956a8b), SkBits2Float(0x
6c6ac798), SkBits2Float(0x692a5d27), SkBits2Float(0x3e56eb72)); // 3.538e+26f,
1.44506e+27f, 1.13532e+27f, 1.28723e+25f, 0.209883f |
| 7508 path.lineTo(SkBits2Float(0x6c6c586c), SkBits2Float(0x00000000)); // 1.1429e+27f
, 0 |
| 7509 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7510 path.conicTo(SkBits2Float(0x6c8c6c6c), SkBits2Float(0x00000000), SkBits2Float(0x
00000000), SkBits2Float(0x6cc8e82a), SkBits2Float(0x5b684b68)); // 1.35809e+27f
, 0, 0, 1.94305e+27f, 6.53851e+16f |
| 7511 path.lineTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21
f, 1.94304e+27f |
| 7512 path.close(); |
| 7513 path.moveTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21
f, 1.94304e+27f |
| 7514 path.quadTo(SkBits2Float(0x641ae35f), SkBits2Float(0x00000000), SkBits2Float(0x0
0000000), SkBits2Float(0x00000000)); // 1.14287e+22f, 0, 0, 0 |
| 7515 path.lineTo(SkBits2Float(0x6c6c586c), SkBits2Float(0x00000000)); // 1.1429e+27f
, 0 |
| 7516 path.conicTo(SkBits2Float(0x6c6ba1fc), SkBits2Float(0x688c9eb1), SkBits2Float(0x
6c6ac798), SkBits2Float(0x692a5d27), SkBits2Float(0x3f7fec32)); // 1.13945e+27f
, 5.31247e+24f, 1.13532e+27f, 1.28723e+25f, 0.999698f |
| 7517 path.lineTo(SkBits2Float(0x63a95a6c), SkBits2Float(0x6cc8e7e2)); // 6.24803e+21
f, 1.94304e+27f |
| 7518 path.close(); |
| 7519 |
| 7520 SkPath path1(path); |
| 7521 path.reset(); |
| 7522 path.setFillType((SkPath::FillType) 0); |
| 7523 path.moveTo(SkBits2Float(0x6c3e3e3e), SkBits2Float(0x586c79ff)); // 9.19959e+26
f, 1.04003e+15f |
| 7524 path.quadTo(SkBits2Float(0x6c6c4a6c), SkBits2Float(0x6c6c6c6c), SkBits2Float(0xc
83e6c6c), SkBits2Float(0x3e313e3e)); // 1.14263e+27f, 1.14327e+27f, -194994, 0.
173089f |
| 7525 |
| 7526 SkPath path2(path); |
| 7527 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename); |
| 7528 } |
| 7529 |
7435 static struct TestDesc failTests[] = { | 7530 static struct TestDesc failTests[] = { |
| 7531 TEST(fuzz763_34), |
| 7532 TEST(fuzz763_33), |
| 7533 TEST(fuzz763_32), |
7436 TEST(fuzz763_31), | 7534 TEST(fuzz763_31), |
7437 TEST(fuzz763_30), | 7535 TEST(fuzz763_30), |
7438 TEST(fuzz763_29), | 7536 TEST(fuzz763_29), |
7439 TEST(fuzz763_28), | 7537 TEST(fuzz763_28), |
7440 TEST(fuzz763_27), | 7538 TEST(fuzz763_27), |
7441 TEST(fuzz763_26), | 7539 TEST(fuzz763_26), |
7442 TEST(fuzz763_25), | 7540 TEST(fuzz763_25), |
7443 TEST(fuzz763_24), | 7541 TEST(fuzz763_24), |
7444 TEST(fuzz763_23), | 7542 TEST(fuzz763_23), |
7445 TEST(fuzz763_22), | 7543 TEST(fuzz763_22), |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7497 static struct TestDesc repTests[] = { | 7595 static struct TestDesc repTests[] = { |
7498 TEST(loops44i), | 7596 TEST(loops44i), |
7499 TEST(loops45i), | 7597 TEST(loops45i), |
7500 TEST(loops46i), | 7598 TEST(loops46i), |
7501 }; | 7599 }; |
7502 | 7600 |
7503 DEF_TEST(PathOpsRepOp, reporter) { | 7601 DEF_TEST(PathOpsRepOp, reporter) { |
7504 for (int index = 0; index < 2; ++index) | 7602 for (int index = 0; index < 2; ++index) |
7505 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); | 7603 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); |
7506 } | 7604 } |
OLD | NEW |