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

Unified Diff: src/pathops/SkPathOpsOp.cpp

Issue 2321973005: Rewriting path writer (Closed)
Patch Set: revert unneeded test changes Created 4 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/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsSimplify.cpp » ('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 b7a48b0510c39f525ff076d6fe06ec1d35f4a232..0f4415bec12cfd3115f970053873c2a775368524 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -152,7 +152,7 @@ static bool bridgeOp(SkOpContourHead* contourList, const SkPathOp op,
current->markDone(spanStart);
}
}
- simple->close();
+ simple->finishContour();
} else {
SkOpSpanBase* last = current->markAndChaseDone(start, end);
if (last && !last->chased()) {
@@ -175,7 +175,7 @@ static bool bridgeOp(SkOpContourHead* contourList, const SkPathOp op,
}
} while (true);
} while (true);
- return simple->someAssemblyRequired();
+ return true;
}
// pretty picture:
@@ -286,7 +286,7 @@ bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result
SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault;
#endif
// turn path into list of segments
- SkOpEdgeBuilder builder(*minuend, &contour, &globalState);
+ SkOpEdgeBuilder builder(*minuend, contourList, &globalState);
if (builder.unparseable()) {
return false;
}
@@ -327,15 +327,10 @@ bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result
result->reset();
result->setFillType(fillType);
SkPathWriter wrapper(*result);
- bridgeOp(contourList, op, xorMask, xorOpMask, &wrapper);
- { // if some edges could not be resolved, assemble remaining fragments
- SkPath temp;
- temp.setFillType(fillType);
- SkPathWriter assembled(temp);
- Assemble(wrapper, &assembled);
- *result = *assembled.nativePath();
- result->setFillType(fillType);
+ if (!bridgeOp(contourList, op, xorMask, xorOpMask, &wrapper)) {
+ return false;
}
+ wrapper.assemble(); // if some edges could not be resolved, assemble remaining
#if DEBUG_T_SECT_LOOP_COUNT
{
SkAutoMutexAcquire autoM(debugWorstLoop);
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsSimplify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698