diff options
author | junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-06 21:47:40 +0000 |
---|---|---|
committer | junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-06 21:47:40 +0000 |
commit | dbfac8a72393eaf01670aeb3244de0e18d8faf98 (patch) | |
tree | 851b0b533bedd77e65dd43746802c4acf59b8390 /tests | |
parent | 4eeda37a7456876cb8d509a4ea43c7f4c684477a (diff) |
Defining new color constat for transparent color
Review URL: https://codereview.appspot.com/6901044
git-svn-id: http://skia.googlecode.com/svn/trunk@6696 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AnnotationTest.cpp | 2 | ||||
-rw-r--r-- | tests/ClipCubicTest.cpp | 2 | ||||
-rw-r--r-- | tests/DrawBitmapRectTest.cpp | 2 | ||||
-rw-r--r-- | tests/DrawPathTest.cpp | 2 | ||||
-rw-r--r-- | tests/EmptyPathTest.cpp | 2 | ||||
-rw-r--r-- | tests/PipeTest.cpp | 2 | ||||
-rw-r--r-- | tests/QuickRejectTest.cpp | 4 |
7 files changed, 8 insertions, 8 deletions
diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp index 17da6226fe..586525a9e8 100644 --- a/tests/AnnotationTest.cpp +++ b/tests/AnnotationTest.cpp @@ -16,7 +16,7 @@ static void test_nodraw(skiatest::Reporter* reporter) { SkBitmap bm; bm.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); bm.allocPixels(); - bm.eraseColor(0); + bm.eraseColor(SK_ColorTRANSPARENT); SkCanvas canvas(bm); SkRect r = SkRect::MakeWH(SkIntToScalar(10), SkIntToScalar(10)); diff --git a/tests/ClipCubicTest.cpp b/tests/ClipCubicTest.cpp index 2e913a7354..e980781d28 100644 --- a/tests/ClipCubicTest.cpp +++ b/tests/ClipCubicTest.cpp @@ -20,7 +20,7 @@ static void test_giantClip() { bm.setConfig(SkBitmap::kARGB_8888_Config, 64919, 1); bm.allocPixels(); SkCanvas canvas(bm); - canvas.clear(0); + canvas.clear(SK_ColorTRANSPARENT); SkPath path; path.moveTo(0, 0); path.lineTo(1, 0); path.lineTo(33, 1); diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp index 0147a71faf..f74199efa3 100644 --- a/tests/DrawBitmapRectTest.cpp +++ b/tests/DrawBitmapRectTest.cpp @@ -36,7 +36,7 @@ static void test_wacky_bitmapshader(skiatest::Reporter* reporter, SkBitmap dev; dev.setConfig(SkBitmap::kARGB_8888_Config, 0x56F, 0x4f6); dev.allocPixels(); - dev.eraseColor(0); // necessary, so we know if we draw to it + dev.eraseColor(SK_ColorTRANSPARENT); // necessary, so we know if we draw to it SkMatrix matrix; diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp index 55e3164b10..171a63ccde 100644 --- a/tests/DrawPathTest.cpp +++ b/tests/DrawPathTest.cpp @@ -210,7 +210,7 @@ static void test_giantaa(skiatest::Reporter* reporter) { const int W = 400; const int H = 400; SkAutoTUnref<SkCanvas> canvas(new_canvas(33000, 10)); - canvas.get()->clear(0); + canvas.get()->clear(SK_ColorTRANSPARENT); SkPaint paint; paint.setAntiAlias(true); diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp index 4cff190afb..be7d529d20 100644 --- a/tests/EmptyPathTest.cpp +++ b/tests/EmptyPathTest.cpp @@ -28,7 +28,7 @@ static void drawAndTest(skiatest::Reporter* reporter, const SkPath& path, // explicitly specify a trim rowbytes, so we have no padding on each row bm.setConfig(SkBitmap::kARGB_8888_Config, DIMENSION, DIMENSION, DIMENSION*4); bm.allocPixels(); - bm.eraseColor(0); + bm.eraseColor(SK_ColorTRANSPARENT); SkCanvas canvas(bm); SkPaint p(paint); diff --git a/tests/PipeTest.cpp b/tests/PipeTest.cpp index 7790c1695d..acf288ae8d 100644 --- a/tests/PipeTest.cpp +++ b/tests/PipeTest.cpp @@ -32,7 +32,7 @@ static void testDrawingAfterEndRecording(SkCanvas* canvas) { SkBitmap bm; bm.setConfig(SkBitmap::kARGB_8888_Config, 2, 2); bm.allocPixels(); - bm.eraseColor(0); + bm.eraseColor(SK_ColorTRANSPARENT); SkShader* shader = SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); diff --git a/tests/QuickRejectTest.cpp b/tests/QuickRejectTest.cpp index b8fb989966..00008330eb 100644 --- a/tests/QuickRejectTest.cpp +++ b/tests/QuickRejectTest.cpp @@ -41,7 +41,7 @@ static void test_drawBitmap(skiatest::Reporter* reporter) { SkBitmap dst; dst.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); dst.allocPixels(); - dst.eraseColor(0); + dst.eraseColor(SK_ColorTRANSPARENT); SkCanvas canvas(dst); SkPaint paint; @@ -54,7 +54,7 @@ static void test_drawBitmap(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, 0xFFFFFFFF == *dst.getAddr32(5, 5)); // reverify we are clear again - dst.eraseColor(0); + dst.eraseColor(SK_ColorTRANSPARENT); REPORTER_ASSERT(reporter, 0 == *dst.getAddr32(5, 5)); // if the bitmap is clipped out, we don't draw it |