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

Unified Diff: src/pathops/SkPathOpsOp.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/SkPathOpsLine.h ('k') | src/pathops/SkPathOpsPoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsOp.cpp
diff --git a/src/pathops/SkPathOpsOp.cpp b/src/pathops/SkPathOpsOp.cpp
index 25ddb7dec6a2302abf5e87ba498c18b6d014e313..f7580ae7d9d066b1644d40aa86ef3831edd69366 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -264,7 +264,7 @@ bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
SkChunkAlloc allocator(4096); // FIXME: add a constant expression here, tune
SkOpContour contour;
SkOpCoincidence coincidence;
- SkOpGlobalState globalState(&coincidence PATH_OPS_DEBUG_PARAMS(&contour));
+ SkOpGlobalState globalState(&coincidence SkDEBUGPARAMS(&contour));
#if DEBUGGING_PATHOPS_FROM_HOST
dump_op(one, two, op);
#endif
@@ -302,18 +302,20 @@ bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
contour.dumpSegments(op);
#endif
- result->reset();
- result->setFillType(fillType);
const int xorOpMask = builder.xorMask();
SkTDArray<SkOpContour* > contourList;
MakeContourList(&contour, contourList, xorMask == kEvenOdd_PathOpsMask,
xorOpMask == kEvenOdd_PathOpsMask);
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** listEnd = contourList.end();
@@ -334,6 +336,8 @@ bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
return false;
}
// construct closed contours
+ result->reset();
+ result->setFillType(fillType);
SkPathWriter wrapper(*result);
bridgeOp(contourList, op, xorMask, xorOpMask, &wrapper, &allocator);
{ // if some edges could not be resolved, assemble remaining fragments
« no previous file with comments | « src/pathops/SkPathOpsLine.h ('k') | src/pathops/SkPathOpsPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698