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

Unified Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 1135693003: Revert of Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/gpu/GrPathUtils.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index bd2997cdf3707746830a6e8da9789f846829fd0c..1ca56487c2f7eb8e2860e2437f8e966611328eca 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 = SkScalarDiv(totalLen, srcIntervalLen);
+ SkScalar temp = totalLen / srcIntervalLen;
SkScalar numFullIntervals = SkScalarFloorToScalar(temp);
*endingInt = totalLen - numFullIntervals * srcIntervalLen + phase;
- temp = SkScalarDiv(*endingInt, srcIntervalLen);
+ temp = *endingInt / srcIntervalLen;
*endingInt = *endingInt - SkScalarFloorToScalar(temp) * srcIntervalLen;
if (0 == *endingInt) {
*endingInt = srcIntervalLen;
« no previous file with comments | « src/gpu/GrPathUtils.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698