Tessellator: better fix for reused-edges issue.

The GrTessellator fix for doubly-added edges in
https://codereview.chromium.org/2259493002/ could leave
a MonotonePoly with zero edges. This is a problem for
Poly::addEdge(), which assumes that MonotonePolys always have
at least one edge. The fix is to move the check and early-out up to
Poly::addEdge(). This should also tighten up the vertex count.

(Unfortunately, the only repro I have for this issue is very
convoluted, and requires non-landed code.)

BUG=skia:5636
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251643008

Review-Url: https://codereview.chromium.org/2251643008
1 file changed