diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-13 13:13:29 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-13 13:13:29 +0000 |
commit | 40fcb598944abdd6578dfd280c1470240b7c7f09 (patch) | |
tree | 55b143ba8b0554b72d138e096aeb3f6fa3410826 | |
parent | 558d5d3f08bcb4ae5c65d318234fe1f3ca61c0b4 (diff) |
More warnings as errors fixes
git-svn-id: http://skia.googlecode.com/svn/trunk@11251 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | tests/ImageFilterTest.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index 0032c7f648..f736b8eda6 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -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))); |