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
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index 8acd04d..b74f6d3 100644
--- a/gm/aaclip.cpp
+++ b/gm/aaclip.cpp
@@ -29,7 +29,7 @@
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, bounds.width(), bounds.height());
     bm.allocPixels();
-    bm.eraseColor(0);
+    bm.eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas* canvas = new SkCanvas(bm);
     canvas->translate(-SkIntToScalar(bounds.fLeft), -SkIntToScalar(bounds.fTop));
diff --git a/gm/arithmode.cpp b/gm/arithmode.cpp
index 6f10dd6..f5e1091 100644
--- a/gm/arithmode.cpp
+++ b/gm/arithmode.cpp
@@ -19,7 +19,7 @@
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, WW, HH);
     bm.allocPixels();
-    bm.eraseColor(0);
+    bm.eraseColor(SK_ColorTRANSPARENT);
     return bm;
 }
 
diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp
index f9b348f..24c3431 100644
--- a/gm/drawbitmaprect.cpp
+++ b/gm/drawbitmaprect.cpp
@@ -34,7 +34,7 @@
 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
     bm->setConfig(config, w, h);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas    canvas(*bm);
 
diff --git a/gm/fatpathfill.cpp b/gm/fatpathfill.cpp
index c23a4ec..4c30949 100644
--- a/gm/fatpathfill.cpp
+++ b/gm/fatpathfill.cpp
@@ -41,7 +41,7 @@
                          const SkPath paths[], int count) {
     SkPaint paint;
 
-    surface->getCanvas()->clear(0);
+    surface->getCanvas()->clear(SK_ColorTRANSPARENT);
     for (int i = 0; i < count; ++i) {
         surface->getCanvas()->drawPath(paths[i], paint);
     }
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 757fa70..316251e 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -371,7 +371,7 @@
                              SkBitmap* bitmap) {
         bitmap->setConfig(gRec.fConfig, size.width(), size.height());
         bitmap->allocPixels();
-        bitmap->eraseColor(0);
+        bitmap->eraseColor(SK_ColorTRANSPARENT);
     }
 
     static void installFilter(SkCanvas* canvas) {
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index 7f8aeaf..c7f043e 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -116,7 +116,7 @@
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, bounds.width(), bounds.height());
     bm.allocPixels();
-    bm.eraseColor(0);
+    bm.eraseColor(SK_ColorTRANSPARENT);
     SkCanvas c(bm);
     draw_path(&c, r, NULL);
 
@@ -133,7 +133,7 @@
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, bounds.width(), bounds.height());
     bm.allocPixels();
-    bm.eraseColor(0);
+    bm.eraseColor(SK_ColorTRANSPARENT);
     SkCanvas c(bm);
     draw_path(&c, r, NULL);
 
diff --git a/gm/ninepatchstretch.cpp b/gm/ninepatchstretch.cpp
index 38b6f7d..773a692 100644
--- a/gm/ninepatchstretch.cpp
+++ b/gm/ninepatchstretch.cpp
@@ -34,7 +34,7 @@
 
     SkCanvas canvas(dev);
     dev->unref();
-    canvas.clear(0);
+    canvas.clear(SK_ColorTRANSPARENT);
 
     SkRect r = SkRect::MakeWH(SkIntToScalar(kSize), SkIntToScalar(kSize));
     const SkScalar strokeWidth = SkIntToScalar(6);
diff --git a/gm/shadertext.cpp b/gm/shadertext.cpp
index d8641db..0e092dc 100644
--- a/gm/shadertext.cpp
+++ b/gm/shadertext.cpp
@@ -15,7 +15,7 @@
 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
     bm->setConfig(config, w, h);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas    canvas(*bm);
     SkScalar    s = SkIntToScalar(SkMin32(w, h));
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp
index 387bd49..e760e54 100644
--- a/gm/shadertext2.cpp
+++ b/gm/shadertext2.cpp
@@ -14,7 +14,7 @@
 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
     bm->setConfig(config, w, h);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas    canvas(*bm);
     SkScalar    s = SkIntToScalar(SkMin32(w, h));
diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp
index 4e95588..ed9b33f 100644
--- a/gm/shadertext3.cpp
+++ b/gm/shadertext3.cpp
@@ -14,7 +14,7 @@
 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
     bm->setConfig(config, w, h);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas    canvas(*bm);
     SkScalar    s = SkIntToScalar(SkMin32(w, h));
diff --git a/gm/tablecolorfilter.cpp b/gm/tablecolorfilter.cpp
index c8806f9..49e342d 100644
--- a/gm/tablecolorfilter.cpp
+++ b/gm/tablecolorfilter.cpp
@@ -15,7 +15,7 @@
     int H = 120;
     bm->setConfig(SkBitmap::kARGB_8888_Config, W, H);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas canvas(*bm);
     SkPaint paint;
@@ -34,7 +34,7 @@
     int H = 120;
     bm->setConfig(SkBitmap::kARGB_8888_Config, W, H);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas canvas(*bm);
     SkPaint paint;
diff --git a/gm/tilemodes.cpp b/gm/tilemodes.cpp
index ab4ea0a..d51fce2 100644
--- a/gm/tilemodes.cpp
+++ b/gm/tilemodes.cpp
@@ -22,7 +22,7 @@
 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
     bm->setConfig(config, w, h);
     bm->allocPixels();
-    bm->eraseColor(0);
+    bm->eraseColor(SK_ColorTRANSPARENT);
 
     SkCanvas    canvas(*bm);
     SkPoint     pts[] = { { 0, 0 }, { SkIntToScalar(w), SkIntToScalar(h)} };
diff --git a/gm/xfermodes.cpp b/gm/xfermodes.cpp
index 22b6edd..8934bc7 100644
--- a/gm/xfermodes.cpp
+++ b/gm/xfermodes.cpp
@@ -15,7 +15,7 @@
 static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst) {
     src->setConfig(SkBitmap::kARGB_8888_Config, w, h);
     src->allocPixels();
-    src->eraseColor(0);
+    src->eraseColor(SK_ColorTRANSPARENT);
 
     SkPaint p;
     p.setAntiAlias(true);
@@ -33,7 +33,7 @@
 
     dst->setConfig(SkBitmap::kARGB_8888_Config, w, h);
     dst->allocPixels();
-    dst->eraseColor(0);
+    dst->eraseColor(SK_ColorTRANSPARENT);
 
     {
         SkCanvas c(*dst);