Skip to content

Commit

Permalink
Bug 1230096 - fix GrAAConvexTessellator assertion. r=jrmuizel
Browse files Browse the repository at this point in the history
  • Loading branch information
lsalzman committed Jan 13, 2016
1 parent eef30ed commit b4185d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gfx/skia/skia/src/gpu/batches/GrAAConvexTessellator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,13 @@ void GrAAConvexTessellator::lineTo(SkPoint p, bool isCurve) {
this->popLastPt();
fNorms.pop();
fIsCurve.pop();
// double-check that the new last point is not a duplicate of the new point. In an ideal
// world this wouldn't be necessary (since it's only possible for non-convex paths), but
// floating point precision issues mean it can actually happen on paths that were determined
// to be convex.
if (duplicate_pt(p, this->lastPoint())) {
return;
}
}
SkScalar initialRingCoverage = fStrokeWidth < 0.0f ? 0.5f : 1.0f;
this->addPt(p, 0.0f, initialRingCoverage, false, isCurve);
Expand Down

0 comments on commit b4185d3

Please sign in to comment.