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

Unified Diff: src/pathops/SkPathOpsOp.cpp

Issue 1405383004: fix path op conic bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix w cast Created 5 years, 2 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/SkPathOpsConic.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 b5e00908fdb858b7457d752e6d0bcf7205d0904c..257cb8ee69b646bc127825e2a82c518794750137 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -111,7 +111,9 @@ static bool bridgeOp(SkOpContourHead* contourList, const SkPathOp op,
if (!unsortable && simple->hasMove()
&& current->verb() != SkPath::kLine_Verb
&& !simple->isClosed()) {
- current->addCurveTo(start, end, simple, true);
+ if (!current->addCurveTo(start, end, simple)) {
+ return false;
+ }
#if DEBUG_ACTIVE_SPANS
if (!simple->isClosed()) {
DebugShowActiveSpans(contourList);
@@ -125,7 +127,9 @@ static bool bridgeOp(SkOpContourHead* contourList, const SkPathOp op,
current->debugID(), start->pt().fX, start->pt().fY,
end->pt().fX, end->pt().fY);
#endif
- current->addCurveTo(start, end, simple, true);
+ if (!current->addCurveTo(start, end, simple)) {
+ return false;
+ }
current = next;
start = nextStart;
end = nextEnd;
@@ -133,7 +137,9 @@ static bool bridgeOp(SkOpContourHead* contourList, const SkPathOp op,
if (current->activeWinding(start, end) && !simple->isClosed()) {
SkOpSpan* spanStart = start->starter(end);
if (!spanStart->done()) {
- current->addCurveTo(start, end, simple, true);
+ if (!current->addCurveTo(start, end, simple)) {
+ return false;
+ }
current->markDone(spanStart);
}
}
« no previous file with comments | « src/pathops/SkPathOpsConic.cpp ('k') | src/pathops/SkPathOpsSimplify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698