fix zero-length tangent
authorcaryclark <caryclark@google.com>
Tue, 25 Aug 2015 15:03:01 +0000 (08:03 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 25 Aug 2015 15:03:01 +0000 (08:03 -0700)
commit7544124fb8ee744f68f549a353f8a9163cd7432d
tree05b3c0bde241520b07e9caa86045542d72b1dc88
parentcf72ed6a3eb13d0ed1aa45beb984bafafa7afff3
fix zero-length tangent

If the end point and the control point are the same, computing
the tangent will result in (0, 0). In this case, use the prior
control point instead.

R=reed@google.com

BUG=skia:4191

Review URL: https://codereview.chromium.org/1311273002
gm/strokes.cpp
src/core/SkGeometry.cpp
tests/GeometryTest.cpp