add convexity logic and tests for scalar max, Inf, and NaN
authorcaryclark <caryclark@google.com>
Mon, 8 Dec 2014 12:57:38 +0000 (04:57 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 8 Dec 2014 12:57:38 +0000 (04:57 -0800)
commitd3d1a988b1ed144b0123dbe594c3a47a63d6451d
treea0bbc8154e4f42af3341db8d06d5798d898b09e8
parentf4e0d9eb2d72fe92c30237de978936113143dc16
add convexity logic and tests for scalar max, Inf, and NaN

PathOps relies on isConvex() only returning true for trivially
convex paths. The old logic also returns true if the paths that
contain NaNs and Infinities. Return kUnknown_Convexity instead
in those cases and in cases where the convexity logic computes
intermediaries that overflow.

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