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

Unified Diff: src/gpu/batches/GrAAHairLinePathRenderer.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/SkPathMeasure.cpp ('k') | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 194c79e41e0d1ef80d8566defc517ee79c2512b1..9d73cf4f17cda711f6fde7e2ecd3ba82a51454f3 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -145,7 +145,10 @@ static int split_conic(const SkPoint src[3], SkConic dst[2], const SkScalar weig
if (dst) {
SkConic conic;
conic.set(src, weight);
- conic.chopAt(t, dst);
+ if (!conic.chopAt(t, dst)) {
+ dst[0].set(src, weight);
+ return 1;
+ }
}
return 2;
}
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698