Index: src/core/SkRRect.cpp |
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp |
index 0d1887d792e05b4661b28e5a4ace1c17d9298e8e..e54256009aab6cbbdda5c49be074679cf1c13a32 100644 |
--- a/src/core/SkRRect.cpp |
+++ b/src/core/SkRRect.cpp |
@@ -26,7 +26,8 @@ |
} |
if (rect.width() < xRad+xRad || rect.height() < yRad+yRad) { |
- SkScalar scale = SkMinScalar(rect.width() / (xRad + xRad), rect.height() / (yRad + yRad)); |
+ SkScalar scale = SkMinScalar(SkScalarDiv(rect.width(), xRad + xRad), |
+ SkScalarDiv(rect.height(), yRad + yRad)); |
SkASSERT(scale < SK_Scalar1); |
xRad = SkScalarMul(xRad, scale); |
yRad = SkScalarMul(yRad, scale); |
@@ -65,10 +66,10 @@ |
SkScalar scale = SK_Scalar1; |
if (leftRad + rightRad > rect.width()) { |
- scale = rect.width() / (leftRad + rightRad); |
+ scale = SkScalarDiv(rect.width(), leftRad + rightRad); |
} |
if (topRad + bottomRad > rect.height()) { |
- scale = SkMinScalar(scale, rect.height() / (topRad + bottomRad)); |
+ scale = SkMinScalar(scale, SkScalarDiv(rect.height(), topRad + bottomRad)); |
} |
if (scale < SK_Scalar1) { |