Compiler fix for r11288

git-svn-id: http://skia.googlecode.com/svn/trunk@11289 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-09-16 14:42:48 +00:00
parent 24ddde9758
commit 1588354a87

View File

@ -37,10 +37,21 @@ public:
for (int x = 0; x < kBitmapSize; x += i) {
canvas.save();
canvas.translate(SkIntToScalar(x), SkIntToScalar(y));
canvas.drawRect(SkRect::MakeXYWH(0, 0, i, i), darkPaint);
canvas.drawRect(SkRect::MakeXYWH(i, 0, i, i), lightPaint);
canvas.drawRect(SkRect::MakeXYWH(0, i, i, i), lightPaint);
canvas.drawRect(SkRect::MakeXYWH(i, i, i, i), darkPaint);
canvas.drawRect(SkRect::MakeXYWH(0, 0,
SkIntToScalar(i),
SkIntToScalar(i)), darkPaint);
canvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(i),
0,
SkIntToScalar(i),
SkIntToScalar(i)), lightPaint);
canvas.drawRect(SkRect::MakeXYWH(0,
SkIntToScalar(i),
SkIntToScalar(i),
SkIntToScalar(i)), lightPaint);
canvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(i),
SkIntToScalar(i),
SkIntToScalar(i),
SkIntToScalar(i)), darkPaint);
canvas.restore();
}
}
@ -125,13 +136,14 @@ public:
0xFFFFFFFF, SK_Scalar1, SK_Scalar1, SK_Scalar1,
new SkBitmapSource(bitmap)))->unref();
SkCanvas canvas(result);
SkRect r = SkRect::MakeWH(kBitmapSize, kBitmapSize);
SkRect r = SkRect::MakeWH(SkIntToScalar(kBitmapSize),
SkIntToScalar(kBitmapSize));
canvas.drawRect(r, paint);
}
{
// This tests for scale bringing width to 0
SkSize scale = SkSize::Make(SkFloatToScalar(-0.001), SK_Scalar1);
SkSize scale = SkSize::Make(SkFloatToScalar(-0.001f), SK_Scalar1);
SkAutoTUnref<SkBicubicImageFilter> bicubic(
SkBicubicImageFilter::CreateMitchell(
scale, new SkBitmapSource(bitmap)));