Index: gm/resizeimagefilter.cpp |
diff --git a/gm/resizeimagefilter.cpp b/gm/resizeimagefilter.cpp |
index 14f76b56cfaf4b1b59a83a1bf30030c93021b9cc..2edb802838e6fb2a30f37e5c0eb725db017c3ddf 100644 |
--- a/gm/resizeimagefilter.cpp |
+++ b/gm/resizeimagefilter.cpp |
@@ -32,8 +32,8 @@ protected: |
SkRect dstRect; |
canvas->getTotalMatrix().mapRect(&dstRect, rect); |
canvas->save(); |
- SkScalar deviceScaleX = SkScalarDiv(deviceSize.width(), dstRect.width()); |
- SkScalar deviceScaleY = SkScalarDiv(deviceSize.height(), dstRect.height()); |
+ SkScalar deviceScaleX = deviceSize.width() / dstRect.width(); |
+ SkScalar deviceScaleY = deviceSize.height() / dstRect.height(); |
canvas->translate(rect.x(), rect.y()); |
canvas->scale(deviceScaleX, deviceScaleY); |
canvas->translate(-rect.x(), -rect.y()); |
@@ -96,7 +96,7 @@ protected: |
SkPaint paint; |
paint.setColor(0xFF00FF00); |
SkRect ovalRect = SkRect::MakeWH(16, 16); |
- ovalRect.inset(SkScalarDiv(2.0f, 3.0f), SkScalarDiv(2.0f, 3.0f)); |
+ ovalRect.inset(SkIntToScalar(2)/3, SkIntToScalar(2)/3); |
bitmapCanvas.drawOval(ovalRect, paint); |
} |
SkRect inRect = SkRect::MakeXYWH(-4, -4, 20, 20); |