fix line intersect divide by zero
Test filinmangust14 exposes two problems:
- finding top of contour can expose divide by zero
- joining partial contour results can add diagonal
The latter makes the test return the wrong result,
and has not been seen in other tests. The fix
is to join disconnected contours by only following
the contours provided as input. Working on that.
The former bug is more straight-forward; just
don't try to compute axis-aligned intersection
if the denominator is zero.
All existing tests prior to the new one work
with this change.
R=caryclark@google.com
Bug: skia:8125
Change-Id: Ic878d090066708d9baca8475f27d4d5aba2294cc
Reviewed-on: https://skia-review.googlesource.com/140121
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
6 files changed