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

Unified Diff: src/core/SkPathMeasure.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/core/SkGeometry.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathMeasure.cpp
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index 8582bc2b734c7a26f14baa3c30989bccd88e473d..05d14d647c43b4b0454e0be6a760cb217a3e7d03 100644
--- a/src/core/SkPathMeasure.cpp
+++ b/src/core/SkPathMeasure.cpp
@@ -85,14 +85,16 @@ void SkPathMeasure_segTo(const SkPoint pts[], unsigned segType,
dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW);
} else {
SkConic tmp[2];
- conic.chopAt(stopT, tmp);
- dst->conicTo(tmp[0].fPts[1], tmp[0].fPts[2], tmp[0].fW);
+ if (conic.chopAt(stopT, tmp)) {
+ dst->conicTo(tmp[0].fPts[1], tmp[0].fPts[2], tmp[0].fW);
+ }
}
} else {
if (SK_Scalar1 == stopT) {
SkConic tmp1[2];
- conic.chopAt(startT, tmp1);
- dst->conicTo(tmp1[1].fPts[1], tmp1[1].fPts[2], tmp1[1].fW);
+ if (conic.chopAt(startT, tmp1)) {
+ dst->conicTo(tmp1[1].fPts[1], tmp1[1].fPts[2], tmp1[1].fW);
+ }
} else {
SkConic tmp;
conic.chopAt(startT, stopT, &tmp);
« no previous file with comments | « src/core/SkGeometry.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698