Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 2176733002: limit number of searched roots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsCubic.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6558 matching lines...) Expand 10 before | Expand all | Expand 10 after
6569 path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f 6569 path.lineTo(SkBits2Float(0xc021211f), SkBits2Float(0x6a4b7b03)); // -2.51765f, 6.14982e+25f
6570 path.close(); 6570 path.close();
6571 path.moveTo(SkBits2Float(0x4f9a3a29), SkBits2Float(0x3ab38a28)); // 5.17501e+09 f, 0.00136978f 6571 path.moveTo(SkBits2Float(0x4f9a3a29), SkBits2Float(0x3ab38a28)); // 5.17501e+09 f, 0.00136978f
6572 path.quadTo(SkBits2Float(0xc368305b), SkBits2Float(0x5b296855), SkBits2Float(0x2 d8c5568), SkBits2Float(0x1f2a2172)); // -232.189f, 4.7684e+16f, 1.59541e-11f, 3 .60266e-20f 6572 path.quadTo(SkBits2Float(0xc368305b), SkBits2Float(0x5b296855), SkBits2Float(0x2 d8c5568), SkBits2Float(0x1f2a2172)); // -232.189f, 4.7684e+16f, 1.59541e-11f, 3 .60266e-20f
6573 path.lineTo(SkBits2Float(0x29c00321), SkBits2Float(0x5b4b7b13)); // 8.52706e-14 f, 5.72747e+16f 6573 path.lineTo(SkBits2Float(0x29c00321), SkBits2Float(0x5b4b7b13)); // 8.52706e-14 f, 5.72747e+16f
6574 6574
6575 SkPath path2(path); 6575 SkPath path2(path);
6576 testPathOpSkipAssert(reporter, path1, path2, (SkPathOp) 4, filename); 6576 testPathOpSkipAssert(reporter, path1, path2, (SkPathOp) 4, filename);
6577 } 6577 }
6578 6578
6579 static void fuzz763_11(skiatest::Reporter* reporter, const char* filename) {
6580 SkPath path;
6581 path.setFillType((SkPath::FillType) 0);
6582
6583 SkPath path1(path);
6584 path.reset();
6585 path.setFillType((SkPath::FillType) 0);
6586 path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24 f, 1.50617e+13f
6587 path.moveTo(SkBits2Float(0x2a0f312a), SkBits2Float(0xc0032108)); // 1.2718e-13f , -2.04889f
6588 path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0xf05b684b), SkBits2Float(0x 8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a 4b7bc0)); // 3.4979e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-3 7f, 6.14991e+25f
6589 path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x 6a4b7b21), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f , 4.7323e-37f, 6.14984e+25f, 9.43289e-15f, 1.21279e-11f
6590 path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24 f, 2.87402e+29f
6591 path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x 295b2d2a), SkBits2Float(0x08685568), SkBits2Float(0x7bc00321)); // 5.76397e-19f , -5.27821e+28f, 4.86669e-14f, 6.99154e-34f, 1.99397e+36f
6592 path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24 f, 2.87402e+29f
6593 path.close();
6594 path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0x70682955)); // 3.48239e+24 f, 2.87402e+29f
6595 path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16 f, 5.7784e-19f
6596 path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f , 6.14991e+25f
6597 path.lineTo(SkBits2Float(0x3a8a3adf), SkBits2Float(0x8a281a4f)); // 0.00105461f , -8.09385e-33f
6598 path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x2 a812a3b), SkBits2Float(0x2a552927)); // 2.25206e-21f, 300.343f, 2.29443e-13f, 1 .89325e-13f
6599 path.quadTo(SkBits2Float(0x3b1e2ab0), SkBits2Float(0x29272021), SkBits2Float(0x2 03a3b27), SkBits2Float(0x22c5381f)); // 0.00241343f, 3.71093e-14f, 1.57744e-19f , 5.34564e-18f
6600 path.moveTo(SkBits2Float(0x5d27ec2a), SkBits2Float(0x705921c2)); // 7.56256e+17 f, 2.68796e+29f
6601 path.quadTo(SkBits2Float(0x102a5152), SkBits2Float(0x5b2dd912), SkBits2Float(0x6 8556829), SkBits2Float(0x555b2d29)); // 3.35892e-29f, 4.89338e+16f, 4.03114e+24 f, 1.50617e+13f
6602 path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032127)); // 3.60396e-20 f, -2.0489f
6603 path.cubicTo(SkBits2Float(0x68392d55), SkBits2Float(0x2a8c684b), SkBits2Float(0x f05b272d), SkBits2Float(0x2a1f1555), SkBits2Float(0x21082a21), SkBits2Float(0x6a 4b7b03)); // 3.4979e+24f, 2.49414e-13f, -2.71298e+29f, 1.41294e-13f, 4.61343e-1 9f, 6.14982e+25f
6604 path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x 6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x2d555b2d)); // 5.77848e-19f , 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 1.21279e-11f
6605 path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13 f, -2.87402e+29f
6606 path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0xef2a8c55), SkBits2Float(0x 295b2d2a), SkBits2Float(0x68210368), SkBits2Float(0x7bc05508)); // 5.76397e-19f , -5.27821e+28f, 4.86669e-14f, 3.04146e+24f, 1.99729e+36f
6607 path.lineTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13 f, -2.87402e+29f
6608 path.close();
6609 path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13 f, -2.87402e+29f
6610 path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x2a21211f)); // 4.85282e+16 f, 1.43112e-13f
6611 path.lineTo(SkBits2Float(0x03552a8c), SkBits2Float(0x6a4f7b28)); // 6.26439e-37 f, 6.27073e+25f
6612 path.conicTo(SkBits2Float(0x2347ed93), SkBits2Float(0x282a3a21), SkBits2Float(0x 3adf2128), SkBits2Float(0x4f1a3a8a), SkBits2Float(0x3ab38a28)); // 1.08381e-17f , 9.4495e-15f, 0.00170234f, 2.58753e+09f, 0.00136978f
6613 path.lineTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13 f, -2.87402e+29f
6614 path.close();
6615 path.moveTo(SkBits2Float(0x2a395b2d), SkBits2Float(0xf0682955)); // 1.64629e-13 f, -2.87402e+29f
6616 path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x2 62a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 5.91556e-16f, 0 .000649768f
6617 path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f , 2.34747e-15f
6618 path.conicTo(SkBits2Float(0x371f203a), SkBits2Float(0xc52a22c4), SkBits2Float(0x c25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x5210513a)); // 9.48464e-06f , -2722.17f, -55.289f, 0.000916855f, 1.5496e+11f
6619 path.cubicTo(SkBits2Float(0x63102ad9), SkBits2Float(0x29c80927), SkBits2Float(0x 633a27b0), SkBits2Float(0x2909c827), SkBits2Float(0x272927b1), SkBits2Float(0x3a 685b2d)); // 2.65942e+21f, 8.88337e-14f, 3.43395e+21f, 3.05937e-14f, 2.3475e-15 f, 0.000886368f
6620 path.moveTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24 f, 5.15884e-14f
6621 path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x 5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x5b2d2729)); // -2.49282e-13 f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 4.87382e+16f
6622 path.quadTo(SkBits2Float(0x2d685568), SkBits2Float(0x5568295b), SkBits2Float(0x2 a552d29), SkBits2Float(0x295b2d27)); // 1.32066e-11f, 1.5954e+13f, 1.89339e-13f , 4.86669e-14f
6623 path.lineTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24 f, 5.15884e-14f
6624 path.close();
6625
6626 SkPath path2(path);
6627 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename);
6628 }
6579 6629
6580 static struct TestDesc failTests[] = { 6630 static struct TestDesc failTests[] = {
6631 TEST(fuzz763_11),
6581 TEST(fuzz763_10), 6632 TEST(fuzz763_10),
6582 TEST(kfuzz2), 6633 TEST(kfuzz2),
6583 TEST(fuzz763_7), 6634 TEST(fuzz763_7),
6584 TEST(fuzz763_6), 6635 TEST(fuzz763_6),
6585 TEST(fuzz763_2c), 6636 TEST(fuzz763_2c),
6586 TEST(fuzz763_2b), 6637 TEST(fuzz763_2b),
6587 TEST(fuzz763_2a), 6638 TEST(fuzz763_2a),
6588 TEST(fuzz763_5a), 6639 TEST(fuzz763_5a),
6589 TEST(fuzz763_3a), 6640 TEST(fuzz763_3a),
6590 TEST(fuzz763_1a), 6641 TEST(fuzz763_1a),
(...skipping 30 matching lines...) Expand all
6621 static struct TestDesc repTests[] = { 6672 static struct TestDesc repTests[] = {
6622 TEST(loops44i), 6673 TEST(loops44i),
6623 TEST(loops45i), 6674 TEST(loops45i),
6624 TEST(loops46i), 6675 TEST(loops46i),
6625 }; 6676 };
6626 6677
6627 DEF_TEST(PathOpsRepOp, reporter) { 6678 DEF_TEST(PathOpsRepOp, reporter) {
6628 for (int index = 0; index < 2; ++index) 6679 for (int index = 0; index < 2; ++index)
6629 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false); 6680 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false);
6630 } 6681 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCubic.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698