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 7315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7326 path.setFillType((SkPath::FillType) 0); | 7326 path.setFillType((SkPath::FillType) 0); |
7327 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 | 7327 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
7328 path.quadTo(SkBits2Float(0x30309ab8), SkBits2Float(0x305b3030), SkBits2Float(0x0
0f53030), SkBits2Float(0x3a3a0000)); // 6.42483e-10f, 7.97402e-10f, 2.2517e-38f
, 0.000709534f | 7328 path.quadTo(SkBits2Float(0x30309ab8), SkBits2Float(0x305b3030), SkBits2Float(0x0
0f53030), SkBits2Float(0x3a3a0000)); // 6.42483e-10f, 7.97402e-10f, 2.2517e-38f
, 0.000709534f |
7329 path.quadTo(SkBits2Float(0xb8b8d5b8), SkBits2Float(0x0b0b0b03), SkBits2Float(0x0
b0b0b0b), SkBits2Float(0x3a3a0b0b)); // -8.81361e-05f, 2.67787e-32f, 2.67787e-3
2f, 0.000709698f | 7329 path.quadTo(SkBits2Float(0xb8b8d5b8), SkBits2Float(0x0b0b0b03), SkBits2Float(0x0
b0b0b0b), SkBits2Float(0x3a3a0b0b)); // -8.81361e-05f, 2.67787e-32f, 2.67787e-3
2f, 0.000709698f |
7330 path.quadTo(SkBits2Float(0xb8b8b8b8), SkBits2Float(0x0b1203b8), SkBits2Float(0x0
b0b0b0b), SkBits2Float(0x3a3a2110)); // -8.80821e-05f, 2.81214e-32f, 2.67787e-3
2f, 0.000710026f | 7330 path.quadTo(SkBits2Float(0xb8b8b8b8), SkBits2Float(0x0b1203b8), SkBits2Float(0x0
b0b0b0b), SkBits2Float(0x3a3a2110)); // -8.80821e-05f, 2.81214e-32f, 2.67787e-3
2f, 0.000710026f |
7331 | 7331 |
7332 SkPath path2(path); | 7332 SkPath path2(path); |
7333 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 4, filename); | 7333 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 4, filename); |
7334 } | 7334 } |
7335 | 7335 |
| 7336 static void fuzz763_29(skiatest::Reporter* reporter, const char* filename) { |
| 7337 SkPath path; |
| 7338 path.setFillType((SkPath::FillType) 1); |
| 7339 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7340 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x743e0000)); // 0, 6.02134e
+31f |
| 7341 path.cubicTo(SkBits2Float(0x74083cf1), SkBits2Float(0x74536e73), SkBits2Float(0x
742ac4e4), SkBits2Float(0x7415f5be), SkBits2Float(0x7433ee3c), SkBits2Float(0x74
05a69a)); // 4.31756e+31f, 6.70053e+31f, 5.41189e+31f, 4.75242e+31f, 5.70223e+3
1f, 4.23556e+31f |
| 7342 path.quadTo(SkBits2Float(0x74360ca0), SkBits2Float(0x7401e10c), SkBits2Float(0x7
436a382), SkBits2Float(0x7401cc18)); // 5.76937e+31f, 4.11603e+31f, 5.78805e+31
f, 4.11344e+31f |
| 7343 path.cubicTo(SkBits2Float(0x74374a91), SkBits2Float(0x7401ef19), SkBits2Float(0x
74375c84), SkBits2Float(0x7404d9b9), SkBits2Float(0x7437868f), SkBits2Float(0x74
0bae8a)); // 5.80873e+31f, 4.11777e+31f, 5.81095e+31f, 4.2102e+31f, 5.81616e+31
f, 4.42669e+31f |
| 7344 path.cubicTo(SkBits2Float(0x7437d6c1), SkBits2Float(0x7418b629), SkBits2Float(0x
74387e9b), SkBits2Float(0x7433fbc5), SkBits2Float(0x743e2ff7), SkBits2Float(0x74
655fa2)); // 5.82609e+31f, 4.83962e+31f, 5.84687e+31f, 5.7039e+31f, 6.02728e+31
f, 7.26914e+31f |
| 7345 path.cubicTo(SkBits2Float(0x741ada75), SkBits2Float(0x74745717), SkBits2Float(0x
73c106b4), SkBits2Float(0x74744e64), SkBits2Float(0x00000000), SkBits2Float(0x74
744006)); // 4.9075e+31f, 7.74345e+31f, 3.05862e+31f, 7.74237e+31f, 0, 7.74059e
+31f |
| 7346 path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x74746c7c), SkBits2Float(0x
74244dce), SkBits2Float(0x7474733e), SkBits2Float(0x74400000), SkBits2Float(0x74
747445)); // 0, 7.7461e+31f, 5.207e+31f, 7.74693e+31f, 6.08472e+31f, 7.74706e+3
1f |
| 7347 path.cubicTo(SkBits2Float(0x743f5854), SkBits2Float(0x746f3659), SkBits2Float(0x
743ebe05), SkBits2Float(0x746a3017), SkBits2Float(0x743e2ff7), SkBits2Float(0x74
655fa2)); // 6.06397e+31f, 7.58094e+31f, 6.04486e+31f, 7.42171e+31f, 6.02728e+3
1f, 7.26914e+31f |
| 7348 path.cubicTo(SkBits2Float(0x7447a582), SkBits2Float(0x74615dee), SkBits2Float(0x
744f74f6), SkBits2Float(0x745c4903), SkBits2Float(0x7455e7e6), SkBits2Float(0x74
55d751)); // 6.32705e+31f, 7.14216e+31f, 6.57457e+31f, 6.98112e+31f, 6.77895e+3
1f, 6.77689e+31f |
| 7349 path.cubicTo(SkBits2Float(0x74747474), SkBits2Float(0x743750a4), SkBits2Float(0x
74747474), SkBits2Float(0x73f46f0d), SkBits2Float(0x74747474), SkBits2Float(0x00
000000)); // 7.74708e+31f, 5.80948e+31f, 7.74708e+31f, 3.87321e+31f, 7.74708e+3
1f, 0 |
| 7350 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7351 path.close(); |
| 7352 |
| 7353 SkPath path1(path); |
| 7354 path.reset(); |
| 7355 path.setFillType((SkPath::FillType) 0); |
| 7356 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7357 path.lineTo(SkBits2Float(0xf0682955), SkBits2Float(0x211f5b2d)); // -2.87402e+2
9f, 5.3992e-19f |
| 7358 path.moveTo(SkBits2Float(0x2d2aff2d), SkBits2Float(0x74747474)); // 9.72004e-12
f, 7.74708e+31f |
| 7359 path.cubicTo(SkBits2Float(0x7474748e), SkBits2Float(0x74747490), SkBits2Float(0x
8c722174), SkBits2Float(0x181f0080), SkBits2Float(0x74c0e520), SkBits2Float(0x74
7d7463)); // 7.7471e+31f, 7.7471e+31f, -1.86531e-31f, 2.05505e-24f, 1.22262e+32
f, 8.0323e+31f |
| 7360 path.cubicTo(SkBits2Float(0x7b005e4b), SkBits2Float(0xdf3a6a3a), SkBits2Float(0x
2a3a2848), SkBits2Float(0x2d2d7821), SkBits2Float(0x8c55212d), SkBits2Float(0x2d
2d2d24)); // 6.66526e+35f, -1.34326e+19f, 1.65341e-13f, 9.86059e-12f, -1.64189e
-31f, 9.84393e-12f |
| 7361 path.conicTo(SkBits2Float(0xde28804c), SkBits2Float(0x28e03721), SkBits2Float(0x
3329df28), SkBits2Float(0x2d291515), SkBits2Float(0x0568295b)); // -3.03545e+18
f, 2.48929e-14f, 3.95513e-08f, 9.61122e-12f, 1.09162e-35f |
| 7362 path.conicTo(SkBits2Float(0x556a2d21), SkBits2Float(0x21088c2a), SkBits2Float(0x
3a333303), SkBits2Float(0x5b293a8a), SkBits2Float(0x6855683b)); // 1.60925e+13f
, 4.62641e-19f, 0.000683591f, 4.76336e+16f, 4.03115e+24f |
| 7363 |
| 7364 SkPath path2(path); |
| 7365 testPathOpFail(reporter, path1, path2, (SkPathOp) 0, filename); |
| 7366 } |
| 7367 |
7336 static struct TestDesc failTests[] = { | 7368 static struct TestDesc failTests[] = { |
| 7369 TEST(fuzz763_29), |
7337 TEST(fuzz763_28), | 7370 TEST(fuzz763_28), |
7338 TEST(fuzz763_27), | 7371 TEST(fuzz763_27), |
7339 TEST(fuzz763_26), | 7372 TEST(fuzz763_26), |
7340 TEST(fuzz763_25), | 7373 TEST(fuzz763_25), |
7341 TEST(fuzz763_24), | 7374 TEST(fuzz763_24), |
7342 TEST(fuzz763_23), | 7375 TEST(fuzz763_23), |
7343 TEST(fuzz763_22), | 7376 TEST(fuzz763_22), |
7344 TEST(fuzz763_21), | 7377 TEST(fuzz763_21), |
7345 TEST(fuzz763_20), | 7378 TEST(fuzz763_20), |
7346 TEST(fuzz763_19), | 7379 TEST(fuzz763_19), |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7395 static struct TestDesc repTests[] = { | 7428 static struct TestDesc repTests[] = { |
7396 TEST(loops44i), | 7429 TEST(loops44i), |
7397 TEST(loops45i), | 7430 TEST(loops45i), |
7398 TEST(loops46i), | 7431 TEST(loops46i), |
7399 }; | 7432 }; |
7400 | 7433 |
7401 DEF_TEST(PathOpsRepOp, reporter) { | 7434 DEF_TEST(PathOpsRepOp, reporter) { |
7402 for (int index = 0; index < 2; ++index) | 7435 for (int index = 0; index < 2; ++index) |
7403 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); | 7436 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); |
7404 } | 7437 } |
OLD | NEW |