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 4856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4867 path.close(); | 4867 path.close(); |
4868 path.moveTo(10, 90); | 4868 path.moveTo(10, 90); |
4869 path.lineTo(110, 90); | 4869 path.lineTo(110, 90); |
4870 path.lineTo(110, 30); | 4870 path.lineTo(110, 30); |
4871 path.lineTo(10, 30); | 4871 path.lineTo(10, 30); |
4872 path.lineTo(10, 90); | 4872 path.lineTo(10, 90); |
4873 path.close(); | 4873 path.close(); |
4874 testSimplify(reporter, path, filename); | 4874 testSimplify(reporter, path, filename); |
4875 } | 4875 } |
4876 | 4876 |
| 4877 static void cr514118(skiatest::Reporter* reporter,const char* filename) { |
| 4878 SkPath path; |
| 4879 path.moveTo(SkBits2Float(0x42c80000), SkBits2Float(0x42480000)); // 100, 50 |
| 4880 path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x00000000), SkBits2Float(0x
42480000), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100, 0, 50,
0, 0.707107f |
| 4881 path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x
00000000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0, 0, 0, 50,
0.707107f |
| 4882 path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x42c80000), SkBits2Float(0x
42480000), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0, 100, 50,
100, 0.707107f |
| 4883 path.conicTo(SkBits2Float(0x42c80000), SkBits2Float(0x42c80000), SkBits2Float(0x
42c80000), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100, 100, 10
0, 50, 0.707107f |
| 4884 path.close(); |
| 4885 path.moveTo(SkBits2Float(0x42c80133), SkBits2Float(0x42480000)); // 100.002f, 5
0 |
| 4886 path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x00000000), SkBits2Float(0x
42480267), SkBits2Float(0x00000000), SkBits2Float(0x3f3504f3)); // 100.002f, 0,
50.0023f, 0, 0.707107f |
| 4887 path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x00000000), SkBits2Float(0x
3b19b530), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 0.00234539f,
0, 0.00234539f, 50, 0.707107f |
| 4888 path.conicTo(SkBits2Float(0x3b19b530), SkBits2Float(0x42c80000), SkBits2Float(0x
42480267), SkBits2Float(0x42c80000), SkBits2Float(0x3f3504f3)); // 0.00234539f,
100, 50.0023f, 100, 0.707107f |
| 4889 path.conicTo(SkBits2Float(0x42c80133), SkBits2Float(0x42c80000), SkBits2Float(0x
42c80133), SkBits2Float(0x42480000), SkBits2Float(0x3f3504f3)); // 100.002f, 10
0, 100.002f, 50, 0.707107f |
| 4890 path.close(); |
| 4891 testSimplify(reporter, path, filename); |
| 4892 } |
| 4893 |
4877 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 4894 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
4878 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 4895 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
4879 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 4896 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
4880 | 4897 |
4881 static TestDesc tests[] = { | 4898 static TestDesc tests[] = { |
| 4899 TEST(cr514118), |
4882 TEST(fuzz864a), | 4900 TEST(fuzz864a), |
4883 TEST(testQuads65), | 4901 TEST(testQuads65), |
4884 TEST(testIssue3838_3), | 4902 TEST(testIssue3838_3), |
4885 TEST(testIssue3838), | 4903 TEST(testIssue3838), |
4886 TEST(testArc), | 4904 TEST(testArc), |
4887 TEST(testTriangle2), | 4905 TEST(testTriangle2), |
4888 TEST(testTriangle1), | 4906 TEST(testTriangle1), |
4889 TEST(testQuads64), | 4907 TEST(testQuads64), |
4890 TEST(testQuads63), | 4908 TEST(testQuads63), |
4891 TEST(testQuads62), | 4909 TEST(testQuads62), |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5322 | 5340 |
5323 DEF_TEST(PathOpsSimplify, reporter) { | 5341 DEF_TEST(PathOpsSimplify, reporter) { |
5324 if (runSubTests && runSubTestsFirst) { | 5342 if (runSubTests && runSubTestsFirst) { |
5325 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5343 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
5326 } | 5344 } |
5327 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5345 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
5328 if (runSubTests && !runSubTestsFirst) { | 5346 if (runSubTests && !runSubTestsFirst) { |
5329 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5347 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
5330 } | 5348 } |
5331 } | 5349 } |
OLD | NEW |