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 5529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5540 | 5540 |
5541 static void bug5169(skiatest::Reporter* reporter, const char* filename) { | 5541 static void bug5169(skiatest::Reporter* reporter, const char* filename) { |
5542 SkPath path; | 5542 SkPath path; |
5543 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 0, 64.8889f | 5543 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x4281c71c)); // 0, 64.8889f |
5544 path.cubicTo(SkBits2Float(0x434e0000), SkBits2Float(0x4281c71c), SkBits2Float(0x
00000000), SkBits2Float(0xc2a238e4), SkBits2Float(0x00000000), SkBits2Float(0x42
81c71c)); // 206, 64.8889f, 0, -81.1111f, 0, 64.8889f | 5544 path.cubicTo(SkBits2Float(0x434e0000), SkBits2Float(0x4281c71c), SkBits2Float(0x
00000000), SkBits2Float(0xc2a238e4), SkBits2Float(0x00000000), SkBits2Float(0x42
81c71c)); // 206, 64.8889f, 0, -81.1111f, 0, 64.8889f |
5545 path.moveTo(SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // 176, 18.888
9f | 5545 path.moveTo(SkBits2Float(0x43300000), SkBits2Float(0x41971c72)); // 176, 18.888
9f |
5546 path.cubicTo(SkBits2Float(0xc29e0000), SkBits2Float(0xc25c71c7), SkBits2Float(0x
42b20000), SkBits2Float(0x42fbc71c), SkBits2Float(0x43300000), SkBits2Float(0x41
971c72)); // -79, -55.1111f, 89, 125.889f, 176, 18.8889f | 5546 path.cubicTo(SkBits2Float(0xc29e0000), SkBits2Float(0xc25c71c7), SkBits2Float(0x
42b20000), SkBits2Float(0x42fbc71c), SkBits2Float(0x43300000), SkBits2Float(0x41
971c72)); // -79, -55.1111f, 89, 125.889f, 176, 18.8889f |
5547 testSimplify(reporter, path, filename); | 5547 testSimplify(reporter, path, filename); |
5548 } | 5548 } |
5549 | 5549 |
| 5550 static void tiger8_393(skiatest::Reporter* reporter, const char* filename) { |
| 5551 SkPath path; |
| 5552 path.setFillType((SkPath::FillType) 0); |
| 5553 path.moveTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666)); // 92.6f, 427.
3f |
| 5554 path.cubicTo(SkBits2Float(0x42b93333), SkBits2Float(0x43d5a666), SkBits2Float(0x
42b5cccd), SkBits2Float(0x43da1999), SkBits2Float(0x42b80000), SkBits2Float(0x43
ddf333)); // 92.6f, 427.3f, 90.9f, 436.2f, 92, 443.9f |
| 5555 path.cubicTo(SkBits2Float(0x42b80000), SkBits2Float(0x43ddf333), SkBits2Float(0x
42b30000), SkBits2Float(0x43e17333), SkBits2Float(0x42cf999a), SkBits2Float(0x43
e1b333)); // 92, 443.9f, 89.5f, 450.9f, 103.8f, 451.4f |
| 5556 path.cubicTo(SkBits2Float(0x42ec3334), SkBits2Float(0x43e14ccd), SkBits2Float(0x
42e73334), SkBits2Float(0x43ddf333), SkBits2Float(0x42e73334), SkBits2Float(0x43
ddf333)); // 118.1f, 450.6f, 115.6f, 443.9f, 115.6f, 443.9f |
| 5557 path.cubicTo(SkBits2Float(0x42e7999a), SkBits2Float(0x43de8000), SkBits2Float(0x
42ea6667), SkBits2Float(0x43db4000), SkBits2Float(0x42e60001), SkBits2Float(0x43
d5a666)); // 115.8f, 445, 117.2f, 438.5f, 115, 427.3f |
| 5558 testSimplify(reporter, path, filename); |
| 5559 } |
| 5560 |
5550 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5561 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
5551 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 5562 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
5552 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5563 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5553 | 5564 |
5554 static TestDesc tests[] = { | 5565 static TestDesc tests[] = { |
| 5566 TEST(tiger8_393), |
5555 TEST(bug5169), | 5567 TEST(bug5169), |
5556 TEST(testQuads73), | 5568 TEST(testQuads73), |
5557 TEST(testQuads72), | 5569 TEST(testQuads72), |
5558 TEST(testQuads71), | 5570 TEST(testQuads71), |
5559 TEST(testQuads70), | 5571 TEST(testQuads70), |
5560 TEST(testQuads69), | 5572 TEST(testQuads69), |
5561 TEST(testQuads68), | 5573 TEST(testQuads68), |
5562 TEST(testQuads67), | 5574 TEST(testQuads67), |
5563 TEST(testQuads66), | 5575 TEST(testQuads66), |
5564 TEST(dean4), | 5576 TEST(dean4), |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6010 | 6022 |
6011 DEF_TEST(PathOpsSimplify, reporter) { | 6023 DEF_TEST(PathOpsSimplify, reporter) { |
6012 if (runSubTests && runSubTestsFirst) { | 6024 if (runSubTests && runSubTestsFirst) { |
6013 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 6025 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
6014 } | 6026 } |
6015 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 6027 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
6016 if (runSubTests && !runSubTestsFirst) { | 6028 if (runSubTests && !runSubTestsFirst) { |
6017 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 6029 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
6018 } | 6030 } |
6019 } | 6031 } |
OLD | NEW |