diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/SkInterpolator.cpp | 3 | ||||
-rw-r--r-- | src/utils/SkNinePatch.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/utils/SkInterpolator.cpp b/src/utils/SkInterpolator.cpp index 97574e475b..03e7e4a83f 100644 --- a/src/utils/SkInterpolator.cpp +++ b/src/utils/SkInterpolator.cpp @@ -62,8 +62,7 @@ SkScalar SkInterpolatorBase::ComputeRelativeT(SkMSec time, SkMSec prevTime, SkMSec nextTime, const SkScalar blend[4]) { SkASSERT(time > prevTime && time < nextTime); - SkScalar t = SkScalarDiv((SkScalar)(time - prevTime), - (SkScalar)(nextTime - prevTime)); + SkScalar t = (SkScalar)(time - prevTime) / (SkScalar)(nextTime - prevTime); return blend ? SkUnitCubicInterp(t, blend[0], blend[1], blend[2], blend[3]) : t; } diff --git a/src/utils/SkNinePatch.cpp b/src/utils/SkNinePatch.cpp index 4e0d1d1a39..ce8d4801c6 100644 --- a/src/utils/SkNinePatch.cpp +++ b/src/utils/SkNinePatch.cpp @@ -161,7 +161,7 @@ void SkNinePatch::DrawMesh(SkCanvas* canvas, const SkRect& bounds, if (bounds.width() >= fixed) stretchX = (bounds.width() - fixed) / stretchSize; else // reuse stretchX, but keep it negative as a signal - stretchX = SkScalarDiv(-bounds.width(), fixed); + stretchX = -bounds.width() / fixed; } if (numYStretch > 0) { @@ -173,7 +173,7 @@ void SkNinePatch::DrawMesh(SkCanvas* canvas, const SkRect& bounds, if (bounds.height() >= fixed) stretchY = (bounds.height() - fixed) / stretchSize; else // reuse stretchX, but keep it negative as a signal - stretchY = SkScalarDiv(-bounds.height(), fixed); + stretchY = -bounds.height() / fixed; } #if 0 |