Filter out degenerate contours in GrConvexPolyEffect

As noticed in a downstream Firefox bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1255062

If a path such as (moveTo, moveTo, lineTo, lineTo, close) is supplied,
and if the non-degenerate contour is convex, the convexity test will
pass, and GrConvexPolyEffect will be used.

However, the path's raw points are used to build the edge list, which
does not filter out degenerate contours. This may cause the polygon to
fail to draw.

This patch ensures that the degenerate contours are filtered out by
using an iterator as the path convexity test does.

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

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