The motivation for this changeset is to fix the following build failure in google3-
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
This commit is contained in:
parent
672d5c2014
commit
7d474f8a84
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user