| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 207 } |
| 208 return !SkToBool(memcmp(fPathRef->conicWeights(), compare.fPathRef->conicWei
ghts(), | 208 return !SkToBool(memcmp(fPathRef->conicWeights(), compare.fPathRef->conicWei
ghts(), |
| 209 fPathRef->countWeights() * sizeof(*fPathRef->conicWeights()))); | 209 fPathRef->countWeights() * sizeof(*fPathRef->conicWeights()))); |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool SkPath::interpolate(const SkPath& ending, SkScalar weight, SkPath* out) con
st { | 212 bool SkPath::interpolate(const SkPath& ending, SkScalar weight, SkPath* out) con
st { |
| 213 int verbCount = fPathRef->countVerbs(); | 213 int verbCount = fPathRef->countVerbs(); |
| 214 if (verbCount != ending.fPathRef->countVerbs()) { | 214 if (verbCount != ending.fPathRef->countVerbs()) { |
| 215 return false; | 215 return false; |
| 216 } | 216 } |
| 217 if (!verbCount) { |
| 218 return true; |
| 219 } |
| 217 out->reset(); | 220 out->reset(); |
| 218 out->addPath(*this); | 221 out->addPath(*this); |
| 219 fPathRef->interpolate(*ending.fPathRef, weight, out->fPathRef); | 222 fPathRef->interpolate(*ending.fPathRef, weight, out->fPathRef); |
| 220 return true; | 223 return true; |
| 221 } | 224 } |
| 222 | 225 |
| 223 static inline bool check_edge_against_rect(const SkPoint& p0, | 226 static inline bool check_edge_against_rect(const SkPoint& p0, |
| 224 const SkPoint& p1, | 227 const SkPoint& p1, |
| 225 const SkRect& rect, | 228 const SkRect& rect, |
| 226 SkPathPriv::FirstDirection dir) { | 229 SkPathPriv::FirstDirection dir) { |
| (...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3206 } | 3209 } |
| 3207 } while (!done); | 3210 } while (!done); |
| 3208 return SkToBool(tangents.count()) ^ isInverse; | 3211 return SkToBool(tangents.count()) ^ isInverse; |
| 3209 } | 3212 } |
| 3210 | 3213 |
| 3211 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, | 3214 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, |
| 3212 SkScalar w, SkPoint pts[], int pow2) { | 3215 SkScalar w, SkPoint pts[], int pow2) { |
| 3213 const SkConic conic(p0, p1, p2, w); | 3216 const SkConic conic(p0, p1, p2, w); |
| 3214 return conic.chopIntoQuadsPOW2(pts, pow2); | 3217 return conic.chopIntoQuadsPOW2(pts, pow2); |
| 3215 } | 3218 } |
| OLD | NEW |