Chromium Code Reviews| Index: src/core/SkGeometry.cpp |
| diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp |
| index 03a63b2bdad93df6914210968284db92f061b4c9..8f270f9722c66f59bbad86c2168f291c0b760cb6 100644 |
| --- a/src/core/SkGeometry.cpp |
| +++ b/src/core/SkGeometry.cpp |
| @@ -1351,8 +1351,10 @@ int SkConic::BuildUnitArc(const SkVector& uStart, const SkVector& uStop, SkRotat |
| // |
| const SkScalar cosThetaOver2 = SkScalarSqrt((1 + dot) / 2); |
| offCurve.setLength(SkScalarInvert(cosThetaOver2)); |
| - dst[conicCount].set(lastQ, offCurve, finalP, cosThetaOver2); |
| - conicCount += 1; |
| + if (!lastQ.equalsWithinTolerance(offCurve)) { |
| + dst[conicCount].set(lastQ, offCurve, finalP, cosThetaOver2); |
| + conicCount += 1; |
| + } |
|
Mark Kilgard
2016/08/26 17:13:07
I don't like this epsilon handling here. It's jus
|
| } |
| // now handle counter-clockwise and the initial unitStart rotation |