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

Unified Diff: src/core/SkGeometry.cpp

Issue 909013004: use conics for round joins and caps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
Index: src/core/SkGeometry.cpp
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp
index 7896b0db40d8debb0d682b13767bb8f1d151ad5b..0246081735b7f6a88756769c17673729e154518a 100644
--- a/src/core/SkGeometry.cpp
+++ b/src/core/SkGeometry.cpp
@@ -1612,7 +1612,7 @@ int SkConic::BuildUnitArc(const SkVector& uStart, const SkVector& uStop, SkRotat
const SkPoint finalP = { x, y };
const SkPoint& lastQ = quadrantPts[quadrant * 2]; // will already be a unit-vector
const SkScalar dot = SkVector::DotProduct(lastQ, finalP);
- SkASSERT(0 <= dot && dot <= SK_Scalar1);
+ SkASSERT(0 <= dot && dot <= SK_Scalar1 + SK_ScalarNearlyZero);
if (dot < 1 - SK_ScalarNearlyZero) {
SkVector offCurve = { lastQ.x() + x, lastQ.y() + y };

Powered by Google App Engine
This is Rietveld 408576698