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

Unified Diff: src/utils/SkInterpolator.cpp

Issue 111393010: replace SkScalarMulRound(a,b) with SkScalarRountToInt(a*b) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/effects/SkPerlinNoiseShader.cpp ('k') | no next file » | 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 595e46402da90e6d6800a4878805bb38b1db1444..dd884b881cc42121a8ac535fe3418917a87957dd 100644
--- a/src/utils/SkInterpolator.cpp
+++ b/src/utils/SkInterpolator.cpp
@@ -77,11 +77,11 @@ SkInterpolatorBase::Result SkInterpolatorBase::timeToT(SkMSec time, SkScalar* T,
this->getDuration(&startTime, &endTime);
SkMSec totalTime = endTime - startTime;
SkMSec offsetTime = time - startTime;
- endTime = SkScalarMulFloor(fRepeat, totalTime);
+ endTime = SkScalarFloorToInt(fRepeat * totalTime);
if (offsetTime >= endTime) {
SkScalar fraction = SkScalarFraction(fRepeat);
offsetTime = fraction == 0 && fRepeat > 0 ? totalTime :
- (SkMSec) SkScalarMulFloor(fraction, totalTime);
+ (SkMSec) SkScalarFloorToInt(fraction * totalTime);
result = kFreezeEnd_Result;
} else {
int mirror = fFlags & kMirror;
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698