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

Unified Diff: src/core/SkScalar.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/core/SkRRect.cpp ('k') | src/core/SkStroke.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalar.cpp
diff --git a/src/core/SkScalar.cpp b/src/core/SkScalar.cpp
index e8f6e9334839cd284add40616e81ea2d2d34e886..c48d3890ad8adfe63014c04c018dea06f9fc4429 100644
--- a/src/core/SkScalar.cpp
+++ b/src/core/SkScalar.cpp
@@ -31,6 +31,6 @@
// Otherwise, interpolate between right - 1 and right.
SkScalar rightKey = keys[right];
SkScalar leftKey = keys[right-1];
- SkScalar fract = (searchKey - leftKey) / (rightKey - leftKey);
+ SkScalar fract = SkScalarDiv(searchKey-leftKey,rightKey-leftKey);
return SkScalarInterp(values[right-1], values[right], fract);
}
« no previous file with comments | « src/core/SkRRect.cpp ('k') | src/core/SkStroke.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698