diff --git a/gm/xfermodeimagefilter.cpp b/gm/xfermodeimagefilter.cpp index e602c7079d..ca7b677f48 100644 --- a/gm/xfermodeimagefilter.cpp +++ b/gm/xfermodeimagefilter.cpp @@ -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(); } diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index d9de0ca774..3b0d143c5b 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -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,