aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRRect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkRRect.cpp')
-rw-r--r--src/core/SkRRect.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp
index e54256009a..0d1887d792 100644
--- a/src/core/SkRRect.cpp
+++ b/src/core/SkRRect.cpp
@@ -26,8 +26,7 @@ void SkRRect::setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) {
}
if (rect.width() < xRad+xRad || rect.height() < yRad+yRad) {
- SkScalar scale = SkMinScalar(SkScalarDiv(rect.width(), xRad + xRad),
- SkScalarDiv(rect.height(), yRad + yRad));
+ SkScalar scale = SkMinScalar(rect.width() / (xRad + xRad), rect.height() / (yRad + yRad));
SkASSERT(scale < SK_Scalar1);
xRad = SkScalarMul(xRad, scale);
yRad = SkScalarMul(yRad, scale);
@@ -66,10 +65,10 @@ void SkRRect::setNinePatch(const SkRect& rect, SkScalar leftRad, SkScalar topRad
SkScalar scale = SK_Scalar1;
if (leftRad + rightRad > rect.width()) {
- scale = SkScalarDiv(rect.width(), leftRad + rightRad);
+ scale = rect.width() / (leftRad + rightRad);
}
if (topRad + bottomRad > rect.height()) {
- scale = SkMinScalar(scale, SkScalarDiv(rect.height(), topRad + bottomRad));
+ scale = SkMinScalar(scale, rect.height() / (topRad + bottomRad));
}
if (scale < SK_Scalar1) {