Win7/8 compiler warnings/errors fix for r9980

git-svn-id: http://skia.googlecode.com/svn/trunk@9991 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-07-11 00:01:39 +00:00
parent 8bad7375d7
commit 31a40ef58b
2 changed files with 16 additions and 12 deletions

View File

@ -167,8 +167,10 @@ protected:
(mode, offsetBackground, offsetForeground)));
paint.setImageFilter(filter);
canvas->save();
canvas->clipRect(SkRect::MakeXYWH(x, y,
SkIntToScalar(fBitmap.width() + 4), SkIntToScalar(fBitmap.height() + 4)));
canvas->clipRect(SkRect::MakeXYWH(SkIntToScalar(x),
SkIntToScalar(y),
SkIntToScalar(fBitmap.width() + 4),
SkIntToScalar(fBitmap.height() + 4)));
canvas->drawPaint(paint);
canvas->restore();
x += fBitmap.width() + MARGIN;
@ -181,8 +183,10 @@ protected:
filter.reset(SkNEW_ARGS(SkXfermodeImageFilter, (mode, offsetBackground, offsetForeground)));
paint.setImageFilter(filter);
canvas->save();
canvas->clipRect(SkRect::MakeXYWH(x, y,
SkIntToScalar(fBitmap.width() + 4), SkIntToScalar(fBitmap.height() + 4)));
canvas->clipRect(SkRect::MakeXYWH(SkIntToScalar(x),
SkIntToScalar(y),
SkIntToScalar(fBitmap.width() + 4),
SkIntToScalar(fBitmap.height() + 4)));
canvas->drawPaint(paint);
canvas->restore();
}

View File

@ -1432,14 +1432,14 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
}
fContext->drawRectToRect(grPaint,
GrRect::MakeXYWH(SkIntToScalar(left),
SkIntToScalar(top),
SkIntToScalar(w),
SkIntToScalar(h)),
GrRect::MakeXYWH(offset.fX,
offset.fY,
SK_Scalar1 * w / texture->width(),
SK_Scalar1 * h / texture->height()));
GrRect::MakeXYWH(SkIntToScalar(left),
SkIntToScalar(top),
SkIntToScalar(w),
SkIntToScalar(h)),
GrRect::MakeXYWH(SkIntToScalar(offset.fX),
SkIntToScalar(offset.fY),
SK_Scalar1 * w / texture->width(),
SK_Scalar1 * h / texture->height()));
}
void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,