quad and conic do not intersect
authorcaryclark <caryclark@google.com>
Thu, 15 Sep 2016 14:48:18 +0000 (07:48 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 15 Sep 2016 14:48:18 +0000 (07:48 -0700)
commite839e78443e48d4ccad89059b4bc4b3d894fcfdd
tree516e3a08710bdbe9dc4785553026f06f14c75e61
parent32d1e95ca593adfaa12bc48d4ac0d5501a4b2046
quad and conic do not intersect

If a quad a conic intersect only where the end of one
is contained by the convex hull of the other, and the
curve contained by the hull is nearly a straight line,
treating it as a line may move the end point to the
other side of the curve.

Detect this by checking to see if the end point is in
the hull, and if so, continue to subdivide the curve
rather than treating it as a line.

This fixes several existing tests that were disabled
earlier this year.

A typo in SkDCurve::nearPoint() prevented detecting when
the end of a line was nearly touching a curve.

Also fixed concidence a bit to get the second half of
tiger further along.

All existing tests, including extended testing in
Release and the first half of tiger, work.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338323002

Review-Url: https://codereview.chromium.org/2338323002
src/pathops/SkDConicLineIntersection.cpp
src/pathops/SkOpCoincidence.cpp
src/pathops/SkPathOpsCurve.cpp
src/pathops/SkPathOpsDebug.h
src/pathops/SkPathOpsQuad.cpp
src/pathops/SkPathOpsTSect.h
tests/PathOpsFuzz763Test.cpp
tests/PathOpsSimplifyTest.cpp
tools/pathops_sorter.htm
tools/pathops_visualizer.htm