| 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 #include "SkIntersections.h" | 9 #include "SkIntersections.h" |
| 10 #include "SkPathOpsLine.h" | 10 #include "SkPathOpsLine.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 static void PathOpsQuadLineIntersectionTest(skiatest::Reporter* reporter) { | 104 static void PathOpsQuadLineIntersectionTest(skiatest::Reporter* reporter) { |
| 105 for (size_t index = 0; index < lineQuadTests_count; ++index) { | 105 for (size_t index = 0; index < lineQuadTests_count; ++index) { |
| 106 int iIndex = static_cast<int>(index); | 106 int iIndex = static_cast<int>(index); |
| 107 const SkDQuad& quad = lineQuadTests[index].quad; | 107 const SkDQuad& quad = lineQuadTests[index].quad; |
| 108 SkASSERT(ValidQuad(quad)); | 108 SkASSERT(ValidQuad(quad)); |
| 109 const SkDLine& line = lineQuadTests[index].line; | 109 const SkDLine& line = lineQuadTests[index].line; |
| 110 SkASSERT(ValidLine(line)); | 110 SkASSERT(ValidLine(line)); |
| 111 SkReduceOrder reducer1, reducer2; | 111 SkReduceOrder reducer1, reducer2; |
| 112 int order1 = reducer1.reduce(quad, SkReduceOrder::kFill_Style); | 112 int order1 = reducer1.reduce(quad); |
| 113 int order2 = reducer2.reduce(line); | 113 int order2 = reducer2.reduce(line); |
| 114 if (order1 < 3) { | 114 if (order1 < 3) { |
| 115 SkDebugf("%s [%d] quad order=%d\n", __FUNCTION__, iIndex, order1); | 115 SkDebugf("%s [%d] quad order=%d\n", __FUNCTION__, iIndex, order1); |
| 116 REPORTER_ASSERT(reporter, 0); | 116 REPORTER_ASSERT(reporter, 0); |
| 117 } | 117 } |
| 118 if (order2 < 2) { | 118 if (order2 < 2) { |
| 119 SkDebugf("%s [%d] line order=%d\n", __FUNCTION__, iIndex, order2); | 119 SkDebugf("%s [%d] line order=%d\n", __FUNCTION__, iIndex, order2); |
| 120 REPORTER_ASSERT(reporter, 0); | 120 REPORTER_ASSERT(reporter, 0); |
| 121 } | 121 } |
| 122 SkIntersections intersections; | 122 SkIntersections intersections; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 145 REPORTER_ASSERT(reporter, 0); | 145 REPORTER_ASSERT(reporter, 0); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 #include "TestClassDef.h" | 151 #include "TestClassDef.h" |
| 152 DEFINE_TESTCLASS_SHORT(PathOpsQuadLineIntersectionTest) | 152 DEFINE_TESTCLASS_SHORT(PathOpsQuadLineIntersectionTest) |
| 153 | 153 |
| 154 DEFINE_TESTCLASS_SHORT(PathOpsQuadLineIntersectionOneOffTest) | 154 DEFINE_TESTCLASS_SHORT(PathOpsQuadLineIntersectionOneOffTest) |
| OLD | NEW |