Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1468)

Unified Diff: src/pathops/SkOpBuilder.cpp

Issue 1218863005: don't fix winding for empty paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pathops/SkOpSpan.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpBuilder.cpp
diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp
index 2fbd4f0460b7a758deea38cfc9f18780e37ffba6..0d229a8c40365fe57c759dd24dd7741aac22b7e4 100644
--- a/src/pathops/SkOpBuilder.cpp
+++ b/src/pathops/SkOpBuilder.cpp
@@ -158,9 +158,11 @@ bool SkOpBuilder::resolve(SkPath* result) {
*result = original;
return false;
}
- // convert the even odd result back to winding form before accumulating it
- FixWinding(&fPathRefs[index]);
- sum.addPath(fPathRefs[index]);
+ if (!fPathRefs[index].isEmpty()) {
+ // convert the even odd result back to winding form before accumulating it
+ FixWinding(&fPathRefs[index]);
+ sum.addPath(fPathRefs[index]);
+ }
}
reset();
bool success = Simplify(sum, result);
« no previous file with comments | « no previous file | src/pathops/SkOpSpan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698