always compute a cubic tangent
authorcaryclark <caryclark@google.com>
Wed, 1 Jun 2016 11:42:02 +0000 (04:42 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Jun 2016 11:42:02 +0000 (04:42 -0700)
commitba150cc283301a28693a18d4aa9d14b1a1616ab3
tree3c57abb22afd6821fc323185c5f914d14a35278d
parent276e63361c73fed6c6528b322400ece81fd1d067
always compute a cubic tangent

If the inflection of a cubic is also the cusp, the tangent
is degenerate at that t when computed directly. Rather than
giving up, subdivide the curve there and use the computed
control points to compute the tangent.

This strategy also removes the error paths where the tangent
formerly could not be computed.

R=reed@google.com
BUG=615686
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2020293002

Review-Url: https://codereview.chromium.org/2020293002
gm/bug615686.cpp [new file with mode: 0644]
src/core/SkStroke.cpp