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

Unified Diff: tests/PathOpsConicIntersectionTest.cpp

Issue 2368993002: allow conic chop to fail (Closed)
Patch Set: address comment 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/SkOpEdgeBuilder.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsConicIntersectionTest.cpp
diff --git a/tests/PathOpsConicIntersectionTest.cpp b/tests/PathOpsConicIntersectionTest.cpp
index 624a68adaf93d28ae144e706b471680af360c2df..e22ad6bff116ed711f4b285a3c39d5dbd2017c8f 100644
--- a/tests/PathOpsConicIntersectionTest.cpp
+++ b/tests/PathOpsConicIntersectionTest.cpp
@@ -165,7 +165,9 @@ static void chopBothWays(const SkDConic& dConic, double t, const char* name) {
conic.fW = dConic.fWeight;
SkConic chopped[2];
SkDConic dChopped[2];
- conic.chopAt(SkDoubleToScalar(t), chopped);
+ if (!conic.chopAt(SkDoubleToScalar(t), chopped)) {
+ return;
+ }
dChopped[0] = dConic.subDivide(0, t);
dChopped[1] = dConic.subDivide(t, 1);
#if DEBUG_VISUALIZE_CONICS
« no previous file with comments | « src/pathops/SkOpEdgeBuilder.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698