use inttoscalar to fix warning
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 28 May 2013 15:42:21 +0000 (15:42 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 28 May 2013 15:42:21 +0000 (15:42 +0000)
BUG=

Review URL: https://codereview.chromium.org/15929006

git-svn-id: http://skia.googlecode.com/svn/trunk@9293 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/filterbitmap.cpp

index 371666d..d7e2352 100644 (file)
@@ -34,10 +34,10 @@ static void load_bm(SkBitmap* bm) {
 }
 
 static SkSize computeSize(const SkBitmap& bm, const SkMatrix& mat) {
-    SkRect bounds = { 0, 0, bm.width(), bm.height() };
+    SkRect bounds = SkRect::MakeWH(SkIntToScalar(bm.width()),
+                                   SkIntToScalar(bm.height()));
     mat.mapRect(&bounds);
-    return SkSize::Make(SkIntToScalar(bounds.width()),
-                        SkIntToScalar(bounds.height()));
+    return SkSize::Make(bounds.width(), bounds.height());
 }
 
 static void draw_col(SkCanvas* canvas, const SkBitmap& bm, const SkMatrix& mat,