aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPathMeasure.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-05-12 09:47:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-12 09:47:22 -0700
commit67d71c898249a7af3523b16c6a69895a63bfae0a (patch)
tree718e9b0eb395ffd67ec0e1bcf3074f0289f89600 /src/core/SkPathMeasure.cpp
parent7da2e55ccbad4868a455c1c9f23e5f63bd99e916 (diff)
stop calling SkScalarDiv
BUG=skia: TBR= Review URL: https://codereview.chromium.org/1135053002
Diffstat (limited to 'src/core/SkPathMeasure.cpp')
-rw-r--r--src/core/SkPathMeasure.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index c963e9cf35..a5dd84048c 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]);
}
}