| 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 "PathOpsTestCommon.h" | 7 #include "PathOpsTestCommon.h" |
| 8 #include "SkPathOpsBounds.h" | 8 #include "SkPathOpsBounds.h" |
| 9 #include "SkPathOpsConic.h" | 9 #include "SkPathOpsConic.h" |
| 10 #include "SkPathOpsCubic.h" | 10 #include "SkPathOpsCubic.h" |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 SkDCubic part = cubic.subDivide(lo, hi); | 230 SkDCubic part = cubic.subDivide(lo, hi); |
| 231 SkPoint cPts[3]; | 231 SkPoint cPts[3]; |
| 232 cPts[0] = part[1].asSkPoint(); | 232 cPts[0] = part[1].asSkPoint(); |
| 233 cPts[1] = part[2].asSkPoint(); | 233 cPts[1] = part[2].asSkPoint(); |
| 234 cPts[2] = part[3].asSkPoint(); | 234 cPts[2] = part[3].asSkPoint(); |
| 235 simplePath->cubicTo(cPts[0].fX, cPts[0].fY, cPts[1].fX, cPts
[1].fY, | 235 simplePath->cubicTo(cPts[0].fX, cPts[0].fY, cPts[1].fX, cPts
[1].fY, |
| 236 cPts[2].fX, cPts[2].fY); | 236 cPts[2].fX, cPts[2].fY); |
| 237 lo = hi; | 237 lo = hi; |
| 238 } | 238 } |
| 239 break; | 239 break; |
| 240 } | 240 } |
| 241 case SkPath::kClose_Verb: | 241 case SkPath::kClose_Verb: |
| 242 simplePath->close(); | 242 simplePath->close(); |
| 243 break; | 243 break; |
| 244 default: | 244 default: |
| 245 SkDEBUGFAIL("bad verb"); | 245 SkDEBUGFAIL("bad verb"); |
| 246 return; | 246 return; |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 } | 322 } |
| 323 return true; | 323 return true; |
| 324 } | 324 } |
| 325 | 325 |
| 326 bool ValidVector(const SkDVector& v) { | 326 bool ValidVector(const SkDVector& v) { |
| 327 if (SkDoubleIsNaN(v.fX)) { | 327 if (SkDoubleIsNaN(v.fX)) { |
| 328 return false; | 328 return false; |
| 329 } | 329 } |
| 330 return !SkDoubleIsNaN(v.fY); | 330 return !SkDoubleIsNaN(v.fY); |
| 331 } | 331 } |
| OLD | NEW |