Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/)
Reason for revert:
android patched, blink has rolled
Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1135693003
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp
index e542560..0d1887d 100644
--- a/src/core/SkRRect.cpp
+++ b/src/core/SkRRect.cpp
@@ -26,8 +26,7 @@
}
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 @@
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) {