summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/utils/SkInterpolator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/utils/SkInterpolator.cpp')
-rw-r--r--chromium/third_party/skia/src/utils/SkInterpolator.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/chromium/third_party/skia/src/utils/SkInterpolator.cpp b/chromium/third_party/skia/src/utils/SkInterpolator.cpp
index 2853b0703a6..dd884b881cc 100644
--- a/chromium/third_party/skia/src/utils/SkInterpolator.cpp
+++ b/chromium/third_party/skia/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;
@@ -155,11 +155,7 @@ void SkInterpolator::reset(int elemCount, int frameCount) {
#define SK_Fixed2Third (SK_Fixed1*2/3)
static const SkScalar gIdentityBlend[4] = {
-#ifdef SK_SCALAR_IS_FLOAT
0.33333333f, 0.33333333f, 0.66666667f, 0.66666667f
-#else
- SK_Fixed1Third, SK_Fixed1Third, SK_Fixed2Third, SK_Fixed2Third
-#endif
};
bool SkInterpolator::setKeyFrame(int index, SkMSec time,