The path ops builder code needs to determine the winding of each contour added, and...
authorcaryclark <caryclark@google.com>
Mon, 18 May 2015 12:12:56 +0000 (05:12 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 18 May 2015 12:12:56 +0000 (05:12 -0700)
commit5b5ddd73b4baf22752924bf20d097e96236c36f8
treee4ae4c9db97d4a19fe504b9aabf5f6d373aeeffa
parent2e0303f91bdada6dddb73105a82f17601265379d
The path ops builder code needs to determine the winding of each contour added, and reverse windings if the contours are nested in other contours.

Cheap (one contour) paths can be evaluated and reversed as needed with a minimum of checking, but multi-contour paths invoke the regular path ops machinery to determine who is contained by whom.

More tests need to be added to verify that all corner cases are considered, but this fixes the cases in the bug thus far.

R=fmalita@chromium.org
TBR=reed@google.com
BUG=skia:3838

Review URL: https://codereview.chromium.org/1129193006
src/pathops/SkOpBuilder.cpp
src/pathops/SkOpContour.cpp
src/pathops/SkOpContour.h
src/pathops/SkOpSegment.cpp
src/pathops/SkOpSegment.h
src/pathops/SkPathOpsCommon.h
src/pathops/SkPathOpsSimplify.cpp
src/pathops/SkPathOpsTypes.h
src/pathops/SkPathOpsWinding.cpp
tests/PathOpsBuilderTest.cpp