aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-05-14 14:18:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-14 14:18:13 -0700
commitfba9da78acf8853f0074d0518411bafc827f3771 (patch)
treef7a87383e2506ebbb463a41f0f04094ca42852dd /src/pathops
parent3489ee0f4fa34f124f9de090d12bdc2107d52aa9 (diff)
fix path op builder
The rewrite of path ops caused the inner contour direction to be reversed. This exposed an existing bug in path ops builder, namely that the implicit winding of the internal sum path could hide inner contours if they ended up in the wrong direction. Setting the sum path's fill type to even-odd ensures that the inner contours aren't discarded. R=fmalita@chromium.org BUG=skia:3838 Review URL: https://codereview.chromium.org/1126193004
Diffstat (limited to 'src/pathops')
-rw-r--r--src/pathops/SkOpBuilder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp
index 2f19b332bc..1a446f15b6 100644
--- a/src/pathops/SkOpBuilder.cpp
+++ b/src/pathops/SkOpBuilder.cpp
@@ -85,6 +85,7 @@ bool SkOpBuilder::resolve(SkPath* result) {
sum.addPath(fPathRefs[index]);
}
reset();
+ sum.setFillType(SkPath::kEvenOdd_FillType);
bool success = Simplify(sum, result);
if (!success) {
*result = original;