| 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 "PathOpsCubicIntersectionTestData.h" | 7 #include "PathOpsCubicIntersectionTestData.h" |
| 8 #include "PathOpsQuadIntersectionTestData.h" | 8 #include "PathOpsQuadIntersectionTestData.h" |
| 9 #include "PathOpsTestCommon.h" | 9 #include "PathOpsTestCommon.h" |
| 10 #include "SkIntersections.h" | 10 #include "SkIntersections.h" |
| 11 #include "SkPathOpsRect.h" | 11 #include "SkPathOpsRect.h" |
| 12 #include "SkReduceOrder.h" | 12 #include "SkReduceOrder.h" |
| 13 #include "Test.h" | 13 #include "Test.h" |
| 14 #include "TestClassDef.h" | |
| 15 | 14 |
| 16 #if 0 // disable test until stroke reduction is supported | 15 #if 0 // disable test until stroke reduction is supported |
| 17 static bool controls_inside(const SkDCubic& cubic) { | 16 static bool controls_inside(const SkDCubic& cubic) { |
| 18 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) | 17 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) |
| 19 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) | 18 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) |
| 20 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY) | 19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY) |
| 21 && between(cubic[0].fY, cubic[2].fY, cubic[3].fY); | 20 && between(cubic[0].fY, cubic[2].fY, cubic[3].fY); |
| 22 } | 21 } |
| 23 | 22 |
| 24 static bool tiny(const SkDCubic& cubic) { | 23 static bool tiny(const SkDCubic& cubic) { |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 && !AlmostEqualUlps(reducer.fLine[1].fX, bounds.fRight)) | 233 && !AlmostEqualUlps(reducer.fLine[1].fX, bounds.fRight)) |
| 235 || (!AlmostEqualUlps(reducer.fLine[1].fY, bounds.fTop) | 234 || (!AlmostEqualUlps(reducer.fLine[1].fY, bounds.fTop) |
| 236 && !AlmostEqualUlps(reducer.fLine[1].fY, bounds.fBottom))) { | 235 && !AlmostEqualUlps(reducer.fLine[1].fY, bounds.fBottom))) { |
| 237 SkDebugf("[%d] line computed tight bounds order=%d\n", static_ca
st<int>(index), order); | 236 SkDebugf("[%d] line computed tight bounds order=%d\n", static_ca
st<int>(index), order); |
| 238 REPORTER_ASSERT(reporter, 0); | 237 REPORTER_ASSERT(reporter, 0); |
| 239 } | 238 } |
| 240 } | 239 } |
| 241 } | 240 } |
| 242 #endif | 241 #endif |
| 243 } | 242 } |
| OLD | NEW |