Index: src/gpu/effects/GrDashingEffect.cpp |
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp |
index 1ca56487c2f7eb8e2860e2437f8e966611328eca..bd2997cdf3707746830a6e8da9789f846829fd0c 100644 |
--- a/src/gpu/effects/GrDashingEffect.cpp |
+++ b/src/gpu/effects/GrDashingEffect.cpp |
@@ -135,10 +135,10 @@ |
} |
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; |