Index: src/core/SkRRect.cpp |
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp |
index e54256009aab6cbbdda5c49be074679cf1c13a32..0d1887d792e05b4661b28e5a4ace1c17d9298e8e 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) { |