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

Unified Diff: gm/beziereffects.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 | « no previous file | samplecode/SampleAAGeometry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/beziereffects.cpp
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 42be080ae3b707a3a61b1be28ed0c8b7ce68f8a4..3dd4d65f7f7c9026b06390f31536b19b167cf0ba 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -353,7 +353,10 @@ private:
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 | « no previous file | samplecode/SampleAAGeometry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698