More warnings as errors fixes
git-svn-id: http://skia.googlecode.com/svn/trunk@11251 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
558d5d3f08
commit
40fcb59894
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user