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

Unified Diff: src/utils/SkInterpolator.cpp

Issue 1138263002: 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/svg/parser/SkSVGSVG.cpp ('k') | src/utils/SkNinePatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkInterpolator.cpp
diff --git a/src/utils/SkInterpolator.cpp b/src/utils/SkInterpolator.cpp
index 03e7e4a83f9d230f60bf5b934601648dfb20ae04..97574e475b4ed791702cd688cd7e35672a5b06e2 100644
--- a/src/utils/SkInterpolator.cpp
+++ b/src/utils/SkInterpolator.cpp
@@ -62,7 +62,8 @@
SkMSec nextTime, const SkScalar blend[4]) {
SkASSERT(time > prevTime && time < nextTime);
- SkScalar t = (SkScalar)(time - prevTime) / (SkScalar)(nextTime - prevTime);
+ SkScalar t = SkScalarDiv((SkScalar)(time - prevTime),
+ (SkScalar)(nextTime - prevTime));
return blend ?
SkUnitCubicInterp(t, blend[0], blend[1], blend[2], blend[3]) : t;
}
« no previous file with comments | « src/svg/parser/SkSVGSVG.cpp ('k') | src/utils/SkNinePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698