fix bugs in path contains
authorcaryclark <caryclark@google.com>
Fri, 18 Dec 2015 12:35:24 +0000 (04:35 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 18 Dec 2015 12:35:24 +0000 (04:35 -0800)
commit9cb5d755e7ea8647bcf8bb1ee151ca4c86051107
tree7036c005ab9109676b4348aa50bbee212c932e97
parentc8b4336444e7b90382e04e33665fb3b8490b825b
fix bugs in path contains

Pull out the logic to check to see if the point is on the edge
so all curve types can share.

Reorder cubic to be like conic and quad so that mixed types
consider the curves consistently.

Don't count on curve points twice if they are on the end
and compute a zero cross product.

Remove logic that checks, when there are no roots, if the
point is closer to the top or the bottom (it's always the top).

Initialize the iterator correctly when it is accessing
the list of on point curves.

Use 'multiply' instead of 'subtract' to see if the vectors
are pointing in opposite directions.

Add more test cases.

R=reed@google.com,fs@opera.com
BUG=skia:4265
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532003004

Review URL: https://codereview.chromium.org/1532003004
src/core/SkPath.cpp
tests/PathTest.cpp