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 4976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4987 path.moveTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42480000)); // 478.806f, 5
0 | 4987 path.moveTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42480000)); // 478.806f, 5
0 |
4988 path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x00000000), SkBits2Float(0x
43d66720), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 478.806f, 0,
428.806f, 0, 0.707107f | 4988 path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x00000000), SkBits2Float(0x
43d66720), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 478.806f, 0,
428.806f, 0, 0.707107f |
4989 path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x00000000), SkBits2Float(0x
43bd6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 378.806f, 0,
378.806f, 50, 0.707107f | 4989 path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x00000000), SkBits2Float(0x
43bd6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 378.806f, 0,
378.806f, 50, 0.707107f |
4990 path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x42c80000), SkBits2Float(0x
43d66720), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 378.806f, 10
0, 428.806f, 100, 0.707107f | 4990 path.conicTo(SkBits2Float(0x43bd6720), SkBits2Float(0x42c80000), SkBits2Float(0x
43d66720), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 378.806f, 10
0, 428.806f, 100, 0.707107f |
4991 path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42c80000), SkBits2Float(0x
43ef6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 478.806f, 10
0, 478.806f, 50, 0.707107f | 4991 path.conicTo(SkBits2Float(0x43ef6720), SkBits2Float(0x42c80000), SkBits2Float(0x
43ef6720), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 478.806f, 10
0, 478.806f, 50, 0.707107f |
4992 path.close(); | 4992 path.close(); |
4993 | 4993 |
4994 testSimplify(reporter, path, filename); | 4994 testSimplify(reporter, path, filename); |
4995 } | 4995 } |
4996 | 4996 |
| 4997 static void fuzz_twister(skiatest::Reporter* reporter, const char* filename) { |
| 4998 SkPath path; |
| 4999 path.setFillType((SkPath::FillType) 0); |
| 5000 path.moveTo(0, 600); |
| 5001 path.lineTo(3.35544e+07f, 600); |
| 5002 path.lineTo(3.35544e+07f, 0); |
| 5003 path.lineTo(0, 0); |
| 5004 path.lineTo(0, 600); |
| 5005 path.close(); |
| 5006 path.moveTo(63, 600); |
| 5007 path.lineTo(3.35545e+07f, 600); |
| 5008 path.lineTo(3.35545e+07f, 0); |
| 5009 path.lineTo(63, 0); |
| 5010 path.lineTo(63, 600); |
| 5011 path.close(); |
| 5012 path.moveTo(93, 600); |
| 5013 path.lineTo(3.35545e+07f, 600); |
| 5014 path.lineTo(3.35545e+07f, 0); |
| 5015 path.lineTo(93, 0); |
| 5016 path.lineTo(93, 600); |
| 5017 path.close(); |
| 5018 path.moveTo(123, 600); |
| 5019 path.lineTo(3.35546e+07f, 600); |
| 5020 path.lineTo(3.35546e+07f, 0); |
| 5021 path.lineTo(123, 0); |
| 5022 path.lineTo(123, 600); |
| 5023 path.close(); |
| 5024 testSimplify(reporter, path, filename); |
| 5025 } |
| 5026 |
4997 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5027 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
4998 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 5028 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
4999 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5029 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5000 | 5030 |
5001 static TestDesc tests[] = { | 5031 static TestDesc tests[] = { |
| 5032 TEST(fuzz_twister), |
5002 TEST(fuzz994s_3414), | 5033 TEST(fuzz994s_3414), |
5003 TEST(fuzz994s_11), | 5034 TEST(fuzz994s_11), |
5004 TEST(cr514118), | 5035 TEST(cr514118), |
5005 TEST(fuzz864a), | 5036 TEST(fuzz864a), |
5006 TEST(testQuads65), | 5037 TEST(testQuads65), |
5007 TEST(testIssue3838_3), | 5038 TEST(testIssue3838_3), |
5008 TEST(testIssue3838), | 5039 TEST(testIssue3838), |
5009 TEST(testArc), | 5040 TEST(testArc), |
5010 TEST(testTriangle2), | 5041 TEST(testTriangle2), |
5011 TEST(testTriangle1), | 5042 TEST(testTriangle1), |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5444 | 5475 |
5445 DEF_TEST(PathOpsSimplify, reporter) { | 5476 DEF_TEST(PathOpsSimplify, reporter) { |
5446 if (runSubTests && runSubTestsFirst) { | 5477 if (runSubTests && runSubTestsFirst) { |
5447 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 5478 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
5448 } | 5479 } |
5449 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5480 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
5450 if (runSubTests && !runSubTestsFirst) { | 5481 if (runSubTests && !runSubTestsFirst) { |
5451 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 5482 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
5452 } | 5483 } |
5453 } | 5484 } |
OLD | NEW |