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

Unified Diff: src/pathops/SkPathOpsSimplify.cpp

Issue 1037953004: add conics to path ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: turn off pathops specific debuggging Created 5 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/pathops/SkPathOpsRect.cpp ('k') | src/pathops/SkPathOpsTCubicSect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsSimplify.cpp
diff --git a/src/pathops/SkPathOpsSimplify.cpp b/src/pathops/SkPathOpsSimplify.cpp
index 5c8a7fd840aef76e0f5dcc5d1fc139d88acc70d6..8d525fa5f7c68f813e613ef435d6b05acd737b7f 100644
--- a/src/pathops/SkPathOpsSimplify.cpp
+++ b/src/pathops/SkPathOpsSimplify.cpp
@@ -191,7 +191,7 @@ bool Simplify(const SkPath& path, SkPath* result) {
// turn path into list of segments
SkOpCoincidence coincidence;
SkOpContour contour;
- SkOpGlobalState globalState(&coincidence PATH_OPS_DEBUG_PARAMS(&contour));
+ SkOpGlobalState globalState(&coincidence SkDEBUGPARAMS(&contour));
#if DEBUG_SORT || DEBUG_SWAP_TOP
SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault;
#endif
@@ -202,16 +202,18 @@ bool Simplify(const SkPath& path, SkPath* result) {
#if !FORCE_RELEASE
contour.dumpSegments((SkPathOp) -1);
#endif
- result->reset();
- result->setFillType(fillType);
SkTDArray<SkOpContour* > contourList;
MakeContourList(&contour, contourList, false, false);
SkOpContour** currentPtr = contourList.begin();
if (!currentPtr) {
+ result->reset();
+ result->setFillType(fillType);
return true;
}
if ((*currentPtr)->count() == 0) {
SkASSERT((*currentPtr)->next() == NULL);
+ result->reset();
+ result->setFillType(fillType);
return true;
}
SkOpContour** listEnd2 = contourList.end();
@@ -231,6 +233,8 @@ bool Simplify(const SkPath& path, SkPath* result) {
return false;
}
// construct closed contours
+ result->reset();
+ result->setFillType(fillType);
SkPathWriter wrapper(*result);
if (builder.xorMask() == kWinding_PathOpsMask ? bridgeWinding(contourList, &wrapper, &allocator)
: !bridgeXor(contourList, &wrapper, &allocator))
« no previous file with comments | « src/pathops/SkPathOpsRect.cpp ('k') | src/pathops/SkPathOpsTCubicSect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698