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

Unified Diff: src/pathops/SkPathOpsSimplify.cpp

Issue 14798004: path ops -- fix skp bugs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | « src/pathops/SkPathOpsRect.h ('k') | src/pathops/SkPathWriter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsSimplify.cpp
===================================================================
--- src/pathops/SkPathOpsSimplify.cpp (revision 9040)
+++ src/pathops/SkPathOpsSimplify.cpp (working copy)
@@ -32,11 +32,15 @@
do {
if (current->activeWinding(index, endIndex)) {
do {
+ if (!unsortable && current->done()) {
#if DEBUG_ACTIVE_SPANS
- if (!unsortable && current->done()) {
DebugShowActiveSpans(contourList);
+ #endif
+ if (simple->isEmpty()) {
+ simple->init();
+ break;
+ }
}
- #endif
SkASSERT(unsortable || !current->done());
int nextStart = index;
int nextEnd = endIndex;
@@ -63,7 +67,7 @@
} while (!simple->isClosed() && (!unsortable
|| !current->done(SkMin32(index, endIndex))));
if (current->activeWinding(index, endIndex) && !simple->isClosed()) {
- SkASSERT(unsortable);
+ SkASSERT(unsortable || simple->isEmpty());
int min = SkMin32(index, endIndex);
if (!current->done(min)) {
current->addCurveTo(index, endIndex, simple, true);
@@ -182,7 +186,7 @@
CoincidenceCheck(&contourList, 0);
FixOtherTIndex(&contourList);
SortSegments(&contourList);
-#if DEBUG_ACTIVE_SPANS
+#if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY
DebugShowActiveSpans(contourList);
#endif
// construct closed contours
« no previous file with comments | « src/pathops/SkPathOpsRect.h ('k') | src/pathops/SkPathWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698