aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpContour.h
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2016-12-19 11:16:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-19 20:54:24 +0000
commit9c16d1e766b60b2d87e2050298a3aa321f394648 (patch)
tree654e3e41fd81d036adbace44db9d33d7973609b7 /src/pathops/SkOpContour.h
parent6750e91544b98b839c3148baef996ab2860233a4 (diff)
handle empty contours in a couple more places
R=kjlubick@google.com BUG=skia:6061 Change-Id: I5b465f1495f80a5ac44253cadf4afd7f509fa75b Reviewed-on: https://skia-review.googlesource.com/6268 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/pathops/SkOpContour.h')
-rw-r--r--src/pathops/SkOpContour.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h
index 03230e1e90..a7a6beefc7 100644
--- a/src/pathops/SkOpContour.h
+++ b/src/pathops/SkOpContour.h
@@ -292,6 +292,9 @@ public:
void resetReverse() {
SkOpContour* next = this;
do {
+ if (!next->count()) {
+ continue;
+ }
next->fCcw = -1;
next->fReverse = false;
} while ((next = next->next()));
@@ -405,6 +408,9 @@ public:
void joinAllSegments() {
SkOpContour* next = this;
do {
+ if (!next->count()) {
+ continue;
+ }
next->joinSegments();
} while ((next = next->next()));
}