diff options
author | Mike Klein <mtklein@chromium.org> | 2018-03-29 13:21:12 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-29 13:21:16 +0000 |
commit | f2590303b73b5fda90bf3873f380ba1739ca861c (patch) | |
tree | 80b3bc2ea84a51f8dc2199441e84e33fae08a5eb /src/gpu | |
parent | 702a7dfc91f90fc6f7b0a9ba0975db2eace960de (diff) |
Revert "GrTessellator: hang fix."
This reverts commit 050c86768a2c24c62655f53ef9b685d40477eccb.
Reason for revert: layout test diff in Chrome roll?
Original change's description:
> 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>
TBR=robertphillips@google.com,senorblanco@chromium.org
Change-Id: Icb928db6c052a21c6d327da9492cb991f769186f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 802896
Reviewed-on: https://skia-review.googlesource.com/117120
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrTessellator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp index b8ec6551c9..00e5c8a21c 100644 --- a/src/gpu/GrTessellator.cpp +++ b/src/gpu/GrTessellator.cpp @@ -1421,6 +1421,12 @@ 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) { |