| 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 "PathOpsQuadIntersectionTestData.h" | 7 #include "PathOpsQuadIntersectionTestData.h" |
| 8 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
| 9 #include "SkIntersections.h" | 9 #include "SkIntersections.h" |
| 10 #include "SkPathOpsRect.h" | 10 #include "SkPathOpsRect.h" |
| 11 #include "SkReduceOrder.h" | 11 #include "SkReduceOrder.h" |
| 12 #include "Test.h" | 12 #include "Test.h" |
| 13 | 13 |
| 14 static void standardTestCases(skiatest::Reporter* reporter) { | 14 static void standardTestCases(skiatest::Reporter* reporter) { |
| 15 bool showSkipped = false; | 15 bool showSkipped = false; |
| 16 for (size_t index = 0; index < quadraticTests_count; ++index) { | 16 for (size_t index = 0; index < quadraticTests_count; ++index) { |
| 17 const SkDQuad& quad1 = quadraticTests[index][0]; | 17 const SkDQuad& quad1 = quadraticTests[index][0]; |
| 18 SkASSERT(ValidQuad(quad1)); | 18 SkASSERT(ValidQuad(quad1)); |
| 19 const SkDQuad& quad2 = quadraticTests[index][1]; | 19 const SkDQuad& quad2 = quadraticTests[index][1]; |
| 20 SkASSERT(ValidQuad(quad2)); | 20 SkASSERT(ValidQuad(quad2)); |
| 21 SkReduceOrder reduce1, reduce2; | 21 SkReduceOrder reduce1, reduce2; |
| 22 int order1 = reduce1.reduce(quad1, SkReduceOrder::kFill_Style); | 22 int order1 = reduce1.reduce(quad1); |
| 23 int order2 = reduce2.reduce(quad2, SkReduceOrder::kFill_Style); | 23 int order2 = reduce2.reduce(quad2); |
| 24 if (order1 < 3) { | 24 if (order1 < 3) { |
| 25 if (showSkipped) { | 25 if (showSkipped) { |
| 26 SkDebugf("[%d] quad1 order=%d\n", static_cast<int>(index), order
1); | 26 SkDebugf("[%d] quad1 order=%d\n", static_cast<int>(index), order
1); |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 if (order2 < 3) { | 29 if (order2 < 3) { |
| 30 if (showSkipped) { | 30 if (showSkipped) { |
| 31 SkDebugf("[%d] quad2 order=%d\n", static_cast<int>(index), order
2); | 31 SkDebugf("[%d] quad2 order=%d\n", static_cast<int>(index), order
2); |
| 32 } | 32 } |
| 33 } | 33 } |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 if (false) QuadraticIntersection_PointFinder(); | 507 if (false) QuadraticIntersection_PointFinder(); |
| 508 } | 508 } |
| 509 | 509 |
| 510 | 510 |
| 511 #include "TestClassDef.h" | 511 #include "TestClassDef.h" |
| 512 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionTest) | 512 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionTest) |
| 513 | 513 |
| 514 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionOneOffTest) | 514 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionOneOffTest) |
| 515 | 515 |
| 516 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionCoincidenceOneOffTest) | 516 DEFINE_TESTCLASS_SHORT(PathOpsQuadIntersectionCoincidenceOneOffTest) |
| OLD | NEW |