aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-06 21:47:40 +0000
committerGravatar junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-06 21:47:40 +0000
commitdbfac8a72393eaf01670aeb3244de0e18d8faf98 (patch)
tree851b0b533bedd77e65dd43746802c4acf59b8390 /gm
parent4eeda37a7456876cb8d509a4ea43c7f4c684477a (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 'gm')
-rw-r--r--gm/aaclip.cpp2
-rw-r--r--gm/arithmode.cpp2
-rw-r--r--gm/drawbitmaprect.cpp2
-rw-r--r--gm/fatpathfill.cpp2
-rw-r--r--gm/gmmain.cpp2
-rw-r--r--gm/imagefiltersbase.cpp4
-rw-r--r--gm/ninepatchstretch.cpp2
-rw-r--r--gm/shadertext.cpp2
-rw-r--r--gm/shadertext2.cpp2
-rw-r--r--gm/shadertext3.cpp2
-rw-r--r--gm/tablecolorfilter.cpp4
-rw-r--r--gm/tilemodes.cpp2
-rw-r--r--gm/xfermodes.cpp4
13 files changed, 16 insertions, 16 deletions
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index 8acd04d1ba..b74f6d3e15 100644
--- a/gm/aaclip.cpp
+++ b/gm/aaclip.cpp
@@ -29,7 +29,7 @@ static SkCanvas* MakeCanvas(const SkIRect& bounds) {
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 6f10dd6beb..f5e1091eff 100644
--- a/gm/arithmode.cpp
+++ b/gm/arithmode.cpp
@@ -19,7 +19,7 @@ static SkBitmap make_bm() {
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 f9b348faf9..24c34318a1 100644
--- a/gm/drawbitmaprect.cpp
+++ b/gm/drawbitmaprect.cpp
@@ -34,7 +34,7 @@ static SkBitmap make_chessbm(int w, int h) {
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 c23a4ecd6f..4c30949f52 100644
--- a/gm/fatpathfill.cpp
+++ b/gm/fatpathfill.cpp
@@ -41,7 +41,7 @@ static void draw_fatpath(SkCanvas* canvas, SkSurface* surface,
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 757fa7036c..316251e5ad 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -371,7 +371,7 @@ public:
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 7f8aeaf231..c7f043e724 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -116,7 +116,7 @@ static void draw_bitmap(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
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 @@ static void draw_sprite(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
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 38b6f7d012..773a692e65 100644
--- a/gm/ninepatchstretch.cpp
+++ b/gm/ninepatchstretch.cpp
@@ -34,7 +34,7 @@ static void make_bitmap(SkBitmap* bitmap, GrContext* ctx, SkIRect* center) {
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 d8641db1c2..0e092dc6d9 100644
--- a/gm/shadertext.cpp
+++ b/gm/shadertext.cpp
@@ -15,7 +15,7 @@ namespace skiagm {
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 387bd498b0..e760e548d5 100644
--- a/gm/shadertext2.cpp
+++ b/gm/shadertext2.cpp
@@ -14,7 +14,7 @@ namespace skiagm {
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 4e9558801a..ed9b33f4ed 100644
--- a/gm/shadertext3.cpp
+++ b/gm/shadertext3.cpp
@@ -14,7 +14,7 @@ namespace skiagm {
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 c8806f904d..49e342d002 100644
--- a/gm/tablecolorfilter.cpp
+++ b/gm/tablecolorfilter.cpp
@@ -15,7 +15,7 @@ static void make_bm0(SkBitmap* bm) {
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 @@ static void make_bm1(SkBitmap* bm) {
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 ab4ea0a2fe..d51fce2cf6 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 22b6edd918..8934bc7323 100644
--- a/gm/xfermodes.cpp
+++ b/gm/xfermodes.cpp
@@ -15,7 +15,7 @@ namespace skiagm {
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 @@ static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst) {
dst->setConfig(SkBitmap::kARGB_8888_Config, w, h);
dst->allocPixels();
- dst->eraseColor(0);
+ dst->eraseColor(SK_ColorTRANSPARENT);
{
SkCanvas c(*dst);