diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
commit | d6176b0dcacb124539e0cfd051e6d93a9782f020 (patch) | |
tree | 9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /tests/DrawBitmapRectTest.cpp | |
parent | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/DrawBitmapRectTest.cpp')
-rw-r--r-- | tests/DrawBitmapRectTest.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp index e11acbc95e..0147a71faf 100644 --- a/tests/DrawBitmapRectTest.cpp +++ b/tests/DrawBitmapRectTest.cpp @@ -37,41 +37,41 @@ static void test_wacky_bitmapshader(skiatest::Reporter* reporter, dev.setConfig(SkBitmap::kARGB_8888_Config, 0x56F, 0x4f6); dev.allocPixels(); dev.eraseColor(0); // necessary, so we know if we draw to it - + SkMatrix matrix; - + SkCanvas c(dev); - matrix.setAll(SkFloatToScalar(-119.34097f), - SkFloatToScalar(-43.436558f), + matrix.setAll(SkFloatToScalar(-119.34097f), + SkFloatToScalar(-43.436558f), SkFloatToScalar(93489.945f), - SkFloatToScalar(43.436558f), - SkFloatToScalar(-119.34097f), + SkFloatToScalar(43.436558f), + SkFloatToScalar(-119.34097f), SkFloatToScalar(123.98426f), 0, 0, SK_Scalar1); c.concat(matrix); - + SkBitmap bm; bm.setConfig(SkBitmap::kARGB_8888_Config, width, height); bm.allocPixels(); bm.eraseColor(SK_ColorRED); - + SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode); - matrix.setAll(SkFloatToScalar(0.0078740157f), - 0, + matrix.setAll(SkFloatToScalar(0.0078740157f), + 0, SkIntToScalar(249), - 0, - SkFloatToScalar(0.0078740157f), + 0, + SkFloatToScalar(0.0078740157f), SkIntToScalar(239), 0, 0, SK_Scalar1); s->setLocalMatrix(matrix); - + SkPaint paint; paint.setShader(s)->unref(); - + SkRect r = SkRect::MakeXYWH(681, 239, 695, 253); c.drawRect(r, paint); - + assert_ifDrawnTo(reporter, dev, shouldBeDrawn); } #endif @@ -106,7 +106,7 @@ static void test_giantrepeat_crbug118018(skiatest::Reporter* reporter) { { 0x7f, 0xFFFF, true }, // should draw, test max height { 0xFFFF, 0xFFFF, false }, // allocation fails (too much RAM) }; - + for (size_t i = 0; i < SK_ARRAY_COUNT(gTests); ++i) { test_wacky_bitmapshader(reporter, gTests[i].fWidth, gTests[i].fHeight, @@ -127,11 +127,11 @@ static void test_nan_antihair(skiatest::Reporter* reporter) { SkPath path; path.moveTo(0, 0); path.lineTo(10, SK_ScalarNaN); - + SkPaint paint; paint.setAntiAlias(true); paint.setStyle(SkPaint::kStroke_Style); - + // before our fix to SkScan_Antihair.cpp to check for integral NaN (0x800...) // this would trigger an assert/crash. // |