diff options
-rw-r--r-- | src/gpu/GrTessellator.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp index 308d5bcc36..4d3c1eb0ee 100644 --- a/src/gpu/GrTessellator.cpp +++ b/src/gpu/GrTessellator.cpp @@ -1247,8 +1247,12 @@ void sanitize_contours(VertexList* contours, int contourCnt, bool approximate) { } else if (!v->fPoint.isFinite()) { LOG("vertex %g,%g non-finite; removing\n", v->fPoint.fX, v->fPoint.fY); contour->remove(v); + } else if (next && Line(prev->fPoint, next->fPoint).dist(v->fPoint) == 0.0) { + LOG("vertex %g,%g collinear; removing\n", v->fPoint.fX, v->fPoint.fY); + contour->remove(v); + } else { + prev = v; } - prev = v; v = next; } } |