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

Unified Diff: src/core/SkStroke.cpp

Issue 1135053002: stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix xpsdevice Created 5 years, 7 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/SkScalar.cpp ('k') | src/core/SkStrokerPriv.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 a3641ffc4fa55aa9fc86f9cf3312f87f2affcb68..6454f1694dd960c6018a00be8103e8d08798b215 100644
--- a/src/core/SkStroke.cpp
+++ b/src/core/SkStroke.cpp
@@ -454,8 +454,7 @@ void SkPathStroker::quad_to(const SkPoint pts[3],
normalB = pts[2] - pts[0];
normalB.rotateCCW();
SkScalar dot = SkPoint::DotProduct(unitNormalAB, *unitNormalBC);
- SkAssertResult(normalB.setLength(SkScalarDiv(fRadius,
- SkScalarSqrt((SK_Scalar1 + dot)/2))));
+ SkAssertResult(normalB.setLength(fRadius / SkScalarSqrt((SK_Scalar1 + dot)/2)));
fOuter.quadTo( pts[1].fX + normalB.fX, pts[1].fY + normalB.fY,
pts[2].fX + normalBC->fX, pts[2].fY + normalBC->fY);
@@ -761,11 +760,9 @@ DRAW_LINE:
normalC = *unitNormalCD + unitBC;
SkScalar dot = SkPoint::DotProduct(unitNormalAB, unitBC);
- SkAssertResult(normalB.setLength(SkScalarDiv(fRadius,
- SkScalarSqrt((SK_Scalar1 + dot)/2))));
+ SkAssertResult(normalB.setLength(fRadius / SkScalarSqrt((SK_Scalar1 + dot)/2)));
dot = SkPoint::DotProduct(*unitNormalCD, unitBC);
- SkAssertResult(normalC.setLength(SkScalarDiv(fRadius,
- SkScalarSqrt((SK_Scalar1 + dot)/2))));
+ SkAssertResult(normalC.setLength(fRadius / SkScalarSqrt((SK_Scalar1 + dot)/2)));
fOuter.cubicTo( pts[1].fX + normalB.fX, pts[1].fY + normalB.fY,
pts[2].fX + normalC.fX, pts[2].fY + normalC.fY,
« no previous file with comments | « src/core/SkScalar.cpp ('k') | src/core/SkStrokerPriv.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698