| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 | 7 |
| 8 #include "SkBuffer.h" | 8 #include "SkBuffer.h" |
| 9 #include "SkCubicClipper.h" | 9 #include "SkCubicClipper.h" |
| 10 #include "SkErrorInternals.h" | 10 #include "SkErrorInternals.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 break; | 268 break; |
| 269 default: | 269 default: |
| 270 SkDEBUGFAIL("unknown verb"); | 270 SkDEBUGFAIL("unknown verb"); |
| 271 } | 271 } |
| 272 if (-1 != nextPt) { | 272 if (-1 != nextPt) { |
| 273 if (SkPath::kConic_Verb == verb) { | 273 if (SkPath::kConic_Verb == verb) { |
| 274 SkConic orig; | 274 SkConic orig; |
| 275 orig.set(pts, iter.conicWeight()); | 275 orig.set(pts, iter.conicWeight()); |
| 276 SkPoint quadPts[5]; | 276 SkPoint quadPts[5]; |
| 277 int count = orig.chopIntoQuadsPOW2(quadPts, 1); | 277 int count = orig.chopIntoQuadsPOW2(quadPts, 1); |
| 278 SK_ALWAYSBREAK(2 == count); | 278 SkASSERT_RELEASE(2 == count); |
| 279 | 279 |
| 280 if (!check_edge_against_rect(quadPts[0], quadPts[2], rect, direc
tion)) { | 280 if (!check_edge_against_rect(quadPts[0], quadPts[2], rect, direc
tion)) { |
| 281 return false; | 281 return false; |
| 282 } | 282 } |
| 283 if (!check_edge_against_rect(quadPts[2], quadPts[4], rect, direc
tion)) { | 283 if (!check_edge_against_rect(quadPts[2], quadPts[4], rect, direc
tion)) { |
| 284 return false; | 284 return false; |
| 285 } | 285 } |
| 286 } else { | 286 } else { |
| 287 if (!check_edge_against_rect(prevPt, pts[nextPt], rect, directio
n)) { | 287 if (!check_edge_against_rect(prevPt, pts[nextPt], rect, directio
n)) { |
| 288 return false; | 288 return false; |
| (...skipping 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3084 } | 3084 } |
| 3085 } while (!done); | 3085 } while (!done); |
| 3086 return SkToBool(tangents.count()) ^ isInverse; | 3086 return SkToBool(tangents.count()) ^ isInverse; |
| 3087 } | 3087 } |
| 3088 | 3088 |
| 3089 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, | 3089 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, |
| 3090 SkScalar w, SkPoint pts[], int pow2) { | 3090 SkScalar w, SkPoint pts[], int pow2) { |
| 3091 const SkConic conic(p0, p1, p2, w); | 3091 const SkConic conic(p0, p1, p2, w); |
| 3092 return conic.chopIntoQuadsPOW2(pts, pow2); | 3092 return conic.chopIntoQuadsPOW2(pts, pow2); |
| 3093 } | 3093 } |
| OLD | NEW |