aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkNinePatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/SkNinePatch.cpp')
-rw-r--r--src/utils/SkNinePatch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/SkNinePatch.cpp b/src/utils/SkNinePatch.cpp
index ce8d4801c6..4e0d1d1a39 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 = -bounds.width() / fixed;
+ stretchX = SkScalarDiv(-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 = -bounds.height() / fixed;
+ stretchY = SkScalarDiv(-bounds.height(), fixed);
}
#if 0