The motivation for this changeset is to fix the following build failure in google3-
authorrmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 2 Jan 2013 22:03:54 +0000 (22:03 +0000)
committerrmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 2 Jan 2013 22:03:54 +0000 (22:03 +0000)
third_party/skia/src/core/SkCanvas.cpp:1711:61: error: non-constant-expression cannot be narrowed from type 'int32_t' (aka 'int') to 'SkScalar' (aka 'float') in initializer list [-Wc++11-narrowing]
        0, SkIntToScalar(c.fLeft), SkIntToScalar(c.fRight), w
                                                            ^
third_party/skia/src/core/SkCanvas.cpp:1711:61: note: override this message by inserting an explicit cast
        0, SkIntToScalar(c.fLeft), SkIntToScalar(c.fRight), w
                                                            ^
                                                            static_cast<SkScalar>( )
Review URL: https://codereview.appspot.com/7041044

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

src/core/SkCanvas.cpp

index 096b42d..67fbcca 100644 (file)
@@ -1708,10 +1708,10 @@ void SkCanvas::internalDrawBitmapNine(const SkBitmap& bitmap,
     c.fBottom = SkPin32(center.fBottom, c.fTop, h);
 
     const SkScalar srcX[4] = {
-        0, SkIntToScalar(c.fLeft), SkIntToScalar(c.fRight), w
+        0, SkIntToScalar(c.fLeft), SkIntToScalar(c.fRight), SkIntToScalar(w)
     };
     const SkScalar srcY[4] = {
-        0, SkIntToScalar(c.fTop), SkIntToScalar(c.fBottom), h
+        0, SkIntToScalar(c.fTop), SkIntToScalar(c.fBottom), SkIntToScalar(h)
     };
     SkScalar dstX[4] = {
         dst.fLeft, dst.fLeft + SkIntToScalar(c.fLeft),