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 5377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5388 | 5388 |
5389 static void circlesOp4(skiatest::Reporter* reporter, const char* filename) { | 5389 static void circlesOp4(skiatest::Reporter* reporter, const char* filename) { |
5390 SkPath path, pathB; | 5390 SkPath path, pathB; |
5391 path.setFillType(SkPath::kWinding_FillType); | 5391 path.setFillType(SkPath::kWinding_FillType); |
5392 path.addCircle(0, 1, 5, SkPath::kCW_Direction); | 5392 path.addCircle(0, 1, 5, SkPath::kCW_Direction); |
5393 pathB.setFillType(SkPath::kWinding_FillType); | 5393 pathB.setFillType(SkPath::kWinding_FillType); |
5394 pathB.addCircle(0, 1, 0, SkPath::kCW_Direction); | 5394 pathB.addCircle(0, 1, 0, SkPath::kCW_Direction); |
5395 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); | 5395 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
5396 } | 5396 } |
5397 | 5397 |
| 5398 static void bug5240(skiatest::Reporter* reporter, const char* filename) { |
| 5399 SkPath path; |
| 5400 path.moveTo(815, 82); |
| 5401 path.cubicTo(814.4794311523438f, 82.7868881225586f, 814.5330810546875f, |
| 5402 82.6266555786133f, 814.5291137695312f, 82.6252212524414f); |
| 5403 path.cubicTo(814.5229492187500f, 82.6230010986328f, 814.3790283203125f, |
| 5404 83.0008087158203f, 813.8533935546875f, 82.7072601318359f); |
| 5405 path.close(); |
| 5406 testPathOp(reporter, path, path, kUnion_SkPathOp, filename); |
| 5407 } |
| 5408 |
5398 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5409 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
5399 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 5410 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
5400 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5411 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5401 | 5412 |
5402 #define TEST(name) { name, #name } | 5413 #define TEST(name) { name, #name } |
5403 | 5414 |
5404 static struct TestDesc tests[] = { | 5415 static struct TestDesc tests[] = { |
| 5416 TEST(bug5240), |
5405 TEST(circlesOp4), | 5417 TEST(circlesOp4), |
5406 TEST(loop17), | 5418 TEST(loop17), |
5407 TEST(cubicOp158), | 5419 TEST(cubicOp158), |
5408 TEST(loops_i1), | 5420 TEST(loops_i1), |
5409 TEST(loops_i2), | 5421 TEST(loops_i2), |
5410 TEST(loops_i3), | 5422 TEST(loops_i3), |
5411 TEST(loops_i4), | 5423 TEST(loops_i4), |
5412 TEST(loops_i5), | 5424 TEST(loops_i5), |
5413 TEST(loops_i6), | 5425 TEST(loops_i6), |
5414 TEST(cubics_d3), | 5426 TEST(cubics_d3), |
(...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8012 } | 8024 } |
8013 | 8025 |
8014 static struct TestDesc repTests[] = { | 8026 static struct TestDesc repTests[] = { |
8015 TEST(fuzz763_5a), | 8027 TEST(fuzz763_5a), |
8016 }; | 8028 }; |
8017 | 8029 |
8018 DEF_TEST(PathOpsRepOp, reporter) { | 8030 DEF_TEST(PathOpsRepOp, reporter) { |
8019 for (int index = 0; index < 1; ++index) | 8031 for (int index = 0; index < 1; ++index) |
8020 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); | 8032 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); |
8021 } | 8033 } |
OLD | NEW |