fix path ops fuzz bug
authorcaryclark <caryclark@google.com>
Wed, 24 Feb 2016 17:03:07 +0000 (09:03 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 24 Feb 2016 17:03:07 +0000 (09:03 -0800)
commitd78c088b6136590371fddd4cab67bfb4bf692fd3
tree7b928823d239ea0c5089b9696af635f694873188
parentd9381acb0efc84e5b54627de554c6cefc43ca97d
fix path ops fuzz bug

If one path is empty and the other has extreme values, the
intermediate coincident paths cannot be resolved, but triggers
an assert that a data structure unexpectedly has zero-length.

Tunnel this failure back up to the top and return that the
entire path op fails.

A future optimization could detect the empty path and avoid
this, allowing the op to succeed -- not sure that it's worth
the additional logic though.

TBR=reed@google.com
BUG=535151
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730293002

Review URL: https://codereview.chromium.org/1730293002
src/pathops/SkOpContour.h
src/pathops/SkOpSegment.cpp
src/pathops/SkOpSegment.h
src/pathops/SkPathOpsCommon.cpp
tests/PathOpsOpTest.cpp