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

Unified Diff: src/pathops/SkOpEdgeBuilder.cpp

Issue 21359002: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove space Created 7 years, 3 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/SkOpContour.cpp ('k') | src/pathops/SkOpSegment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpEdgeBuilder.cpp
diff --git a/src/pathops/SkOpEdgeBuilder.cpp b/src/pathops/SkOpEdgeBuilder.cpp
index a5a658486868b0509ee1887ecb0fd06e81b9d6ff..676c34fb37971da3442eaa9ba81f7740b424d0c6 100644
--- a/src/pathops/SkOpEdgeBuilder.cpp
+++ b/src/pathops/SkOpEdgeBuilder.cpp
@@ -13,9 +13,9 @@ void SkOpEdgeBuilder::init() {
fOperand = false;
fXorMask[0] = fXorMask[1] = (fPath->getFillType() & 1) ? kEvenOdd_PathOpsMask
: kWinding_PathOpsMask;
-#if DEBUG_DUMP
- gContourID = 0;
- gSegmentID = 0;
+#ifdef SK_DEBUG
+ SkPathOpsDebug::gContourID = 0;
+ SkPathOpsDebug::gSegmentID = 0;
#endif
fUnparseable = false;
fSecondHalf = preFetch();
@@ -84,6 +84,9 @@ int SkOpEdgeBuilder::preFetch() {
case SkPath::kLine_Verb:
if (AlmostEqualUlps(curve[0].fX, pts[1].fX)
&& AlmostEqualUlps(curve[0].fY, pts[1].fY)) {
+ if (fPathVerbs.back() != SkPath::kLine_Verb) {
+ fPathPts.back() = pts[1];
+ }
continue; // skip degenerate points
}
break;
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpSegment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698