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

Unified Diff: src/core/SkPathMeasure.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/SkPaint.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathMeasure.cpp
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index c963e9cf356df10868cf98be3daee42b03d2926a..a5dd84048c56c88334020f1a6d6907b54b918413 100644
--- a/src/core/SkPathMeasure.cpp
+++ b/src/core/SkPathMeasure.cpp
@@ -341,8 +341,7 @@ static void seg_to(const SkPoint pts[], int segType,
if (SK_Scalar1 == stopT) {
dst->quadTo(tmp0[3], tmp0[4]);
} else {
- SkChopQuadAt(&tmp0[2], tmp1, SkScalarDiv(stopT - startT,
- SK_Scalar1 - startT));
+ SkChopQuadAt(&tmp0[2], tmp1, (stopT - startT) / (1 - startT));
dst->quadTo(tmp1[1], tmp1[2]);
}
}
@@ -383,8 +382,7 @@ static void seg_to(const SkPoint pts[], int segType,
if (SK_Scalar1 == stopT) {
dst->cubicTo(tmp0[4], tmp0[5], tmp0[6]);
} else {
- SkChopCubicAt(&tmp0[3], tmp1, SkScalarDiv(stopT - startT,
- SK_Scalar1 - startT));
+ SkChopCubicAt(&tmp0[3], tmp1, (stopT - startT) / (1 - startT));
dst->cubicTo(tmp1[1], tmp1[2], tmp1[3]);
}
}
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698