aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-05-12 10:28:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-12 10:28:06 -0700
commit2629697933b5cc975e45d2a45c48f803fc6cbcec (patch)
tree53730ca8354552773d93adfe7ade5f1e2bc18192 /src/gpu/effects
parent39a9a5069b25aa8b9529118cfd0ece5f412fb56b (diff)
Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
Reason for revert: need to wait for Blink roll (and patch android) Original issue's description: > stop calling SkScalarDiv > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1138263002
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrDashingEffect.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 1ca56487c2..bd2997cdf3 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -135,10 +135,10 @@ static SkScalar calc_end_adjustment(const SkScalar intervals[2], const SkPoint p
}
SkScalar srcIntervalLen = intervals[0] + intervals[1];
SkScalar totalLen = pts[1].fX - pts[0].fX;
- SkScalar temp = totalLen / srcIntervalLen;
+ SkScalar temp = SkScalarDiv(totalLen, srcIntervalLen);
SkScalar numFullIntervals = SkScalarFloorToScalar(temp);
*endingInt = totalLen - numFullIntervals * srcIntervalLen + phase;
- temp = *endingInt / srcIntervalLen;
+ temp = SkScalarDiv(*endingInt, srcIntervalLen);
*endingInt = *endingInt - SkScalarFloorToScalar(temp) * srcIntervalLen;
if (0 == *endingInt) {
*endingInt = srcIntervalLen;