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

Unified Diff: src/core/SkStroke.cpp

Issue 460813002: Fallback to moveTo when unable to find the first tangent in cubicTo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: is -> was Created 6 years, 4 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 | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStroke.cpp
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp
index b138c326bab497c96429ed1d111ff57954c8ab0d..1e4ae79a5e0108725d2492a268bdeac122e053bb 100644
--- a/src/core/SkStroke.cpp
+++ b/src/core/SkStroke.cpp
@@ -424,7 +424,8 @@ void SkPathStroker::cubicTo(const SkPoint& pt1, const SkPoint& pt2,
bool degenerateBC = SkPath::IsLineDegenerate(pt1, pt2);
bool degenerateCD = SkPath::IsLineDegenerate(pt2, pt3);
- if (degenerateAB + degenerateBC + degenerateCD >= 2) {
+ if (degenerateAB + degenerateBC + degenerateCD >= 2
+ || (degenerateAB && SkPath::IsLineDegenerate(fPrevPt, pt2))) {
this->lineTo(pt3);
return;
}
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698