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

Unified Diff: src/pathops/SkOpEdgeBuilder.cpp

Issue 14474002: path ops : make it real (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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/core/SkCanvas.cpp ('k') | src/pathops/SkPathOpsOp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpEdgeBuilder.cpp
===================================================================
--- src/pathops/SkOpEdgeBuilder.cpp (revision 8821)
+++ src/pathops/SkOpEdgeBuilder.cpp (working copy)
@@ -78,7 +78,11 @@
const SkPoint* finalCurveStart = NULL;
const SkPoint* finalCurveEnd = NULL;
SkPath::Verb verb;
- while ((verb = (SkPath::Verb) *verbPtr++) != SkPath::kDone_Verb) {
+ while ((verb = (SkPath::Verb) *verbPtr) != SkPath::kDone_Verb) {
+ if (verbPtr == endOfFirstHalf) {
+ fOperand = true;
+ }
+ verbPtr++;
switch (verb) {
case SkPath::kMove_Verb:
complete();
@@ -89,7 +93,7 @@
*fExtra.append() = -1; // start new contour
}
finalCurveEnd = pointsPtr++;
- goto nextVerb;
+ continue;
case SkPath::kLine_Verb:
// skip degenerate points
if (pointsPtr[-1].fX != pointsPtr[0].fX || pointsPtr[-1].fY != pointsPtr[0].fY) {
@@ -132,7 +136,7 @@
*fExtra.append() = fCurrentContour->addLine(fReducePts.end() - 2);
}
complete();
- goto nextVerb;
+ continue;
default:
SkDEBUGFAIL("bad verb");
return;
@@ -140,9 +144,5 @@
finalCurveStart = &pointsPtr[verb - 1];
pointsPtr += verb;
SkASSERT(fCurrentContour);
- nextVerb:
- if (verbPtr == endOfFirstHalf) {
- fOperand = true;
- }
}
}
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/pathops/SkPathOpsOp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698