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

Unified Diff: src/pathops/SkOpContour.h

Issue 633393002: harden pathops for pathological test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: exclude new test that asserts in debug Created 6 years, 1 month 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 | « src/pathops/SkOpAngle.cpp ('k') | src/pathops/SkOpContour.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpContour.h
diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h
index 899367ab0e4ca99e22a693955c808e295fd80488..7a1cc09247a49bb614ce1ebbf7ba7f7711368529 100644
--- a/src/pathops/SkOpContour.h
+++ b/src/pathops/SkOpContour.h
@@ -127,9 +127,9 @@ public:
}
}
- void checkEnds() {
+ bool checkEnds() {
if (!fContainsCurves) {
- return;
+ return true;
}
int segmentCount = fSegments.count();
for (int sIndex = 0; sIndex < segmentCount; ++sIndex) {
@@ -140,8 +140,11 @@ public:
if (segment->done()) {
continue; // likely coincident, nothing to do
}
- segment->checkEnds();
+ if (!segment->checkEnds()) {
+ return false;
+ }
}
+ return true;
}
void checkMultiples() {
« no previous file with comments | « src/pathops/SkOpAngle.cpp ('k') | src/pathops/SkOpContour.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698