| 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 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3170 } | 3170 } |
| 3171 if (w) { | 3171 if (w) { |
| 3172 return !isInverse; | 3172 return !isInverse; |
| 3173 } | 3173 } |
| 3174 if (onCurveCount <= 1) { | 3174 if (onCurveCount <= 1) { |
| 3175 return SkToBool(onCurveCount) ^ isInverse; | 3175 return SkToBool(onCurveCount) ^ isInverse; |
| 3176 } | 3176 } |
| 3177 if ((onCurveCount & 1) || evenOddFill) { | 3177 if ((onCurveCount & 1) || evenOddFill) { |
| 3178 return SkToBool(onCurveCount & 1) ^ isInverse; | 3178 return SkToBool(onCurveCount & 1) ^ isInverse; |
| 3179 } | 3179 } |
| 3180 // If the point touches an even number of curves, and the fill is winding, c
heck for | 3180 // If the point touches an even number of curves, and the fill is winding, c
heck for |
| 3181 // coincidence. Count coincidence as places where the on curve points have i
dentical tangents. | 3181 // coincidence. Count coincidence as places where the on curve points have i
dentical tangents. |
| 3182 iter.setPath(*this, true); | 3182 iter.setPath(*this, true); |
| 3183 done = false; | 3183 done = false; |
| 3184 SkTDArray<SkVector> tangents; | 3184 SkTDArray<SkVector> tangents; |
| 3185 do { | 3185 do { |
| 3186 SkPoint pts[4]; | 3186 SkPoint pts[4]; |
| 3187 int oldCount = tangents.count(); | 3187 int oldCount = tangents.count(); |
| 3188 switch (iter.next(pts, false)) { | 3188 switch (iter.next(pts, false)) { |
| 3189 case SkPath::kMove_Verb: | 3189 case SkPath::kMove_Verb: |
| 3190 case SkPath::kClose_Verb: | 3190 case SkPath::kClose_Verb: |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3225 } | 3225 } |
| 3226 } while (!done); | 3226 } while (!done); |
| 3227 return SkToBool(tangents.count()) ^ isInverse; | 3227 return SkToBool(tangents.count()) ^ isInverse; |
| 3228 } | 3228 } |
| 3229 | 3229 |
| 3230 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, | 3230 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, |
| 3231 SkScalar w, SkPoint pts[], int pow2) { | 3231 SkScalar w, SkPoint pts[], int pow2) { |
| 3232 const SkConic conic(p0, p1, p2, w); | 3232 const SkConic conic(p0, p1, p2, w); |
| 3233 return conic.chopIntoQuadsPOW2(pts, pow2); | 3233 return conic.chopIntoQuadsPOW2(pts, pow2); |
| 3234 } | 3234 } |
| OLD | NEW |