diff options
author | Stephen White <senorblanco@chromium.org> | 2018-03-28 14:41:22 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-28 19:55:34 +0000 |
commit | 050c86768a2c24c62655f53ef9b685d40477eccb (patch) | |
tree | 60e89b1c28d62bee2b7d1498bfffcc46963b2e23 /src/gpu | |
parent | 6eba063b63efbf824aff8ec6b32af05e4d54c38b (diff) |
GrTessellator: hang fix.
Some edges are not coincident with their own endpoints (because floating
point). If this happens for an edge which is a right-enclosing-edge
during the Bentley-Ottman simplify() pass, we end up an infinite loop
attempting to split the edge, since the edge is never to the right of its
endpoint.
The easiest fix is to simply remove the right-enclosing-edge splitting
code. This code was originally added before we had proper
active-edge-list rewinding, and should no longer be necessary.
BUG=802896
Change-Id: Id9f2942b73f01152af8c0088e8c6b1389891d827
Reviewed-on: https://skia-review.googlesource.com/116920
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrTessellator.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp index 00e5c8a21c..b8ec6551c9 100644 --- a/src/gpu/GrTessellator.cpp +++ b/src/gpu/GrTessellator.cpp @@ -1421,12 +1421,6 @@ bool simplify(VertexList* mesh, Comparator& c, SkArenaAlloc& alloc) { LOG("\nvertex %g: (%g,%g), alpha %d\n", v->fID, v->fPoint.fX, v->fPoint.fY, v->fAlpha); restartChecks = false; find_enclosing_edges(v, &activeEdges, &leftEnclosingEdge, &rightEnclosingEdge); - if (rightEnclosingEdge && !rightEnclosingEdge->isRightOf(v)) { - split_edge(rightEnclosingEdge, v, &activeEdges, &v, c, alloc); - restartChecks = true; - continue; - } - SkASSERT(!rightEnclosingEdge || rightEnclosingEdge->isRightOf(v)); v->fLeftEnclosingEdge = leftEnclosingEdge; v->fRightEnclosingEdge = rightEnclosingEdge; if (v->fFirstEdgeBelow) { |