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/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 458cb61..9d51f9b 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -1023,7 +1023,7 @@
} else {
// if the src has alpha, we have to clear the dst first
if (!src->isOpaque()) {
- tmpDst.eraseColor(0);
+ tmpDst.eraseColor(SK_ColorTRANSPARENT);
}
SkCanvas canvas(tmpDst);
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 7da9a6b..56b1841 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -44,7 +44,7 @@
fBitmap.allocPixels();
fBitmap.setIsOpaque(isOpaque);
if (!isOpaque) {
- fBitmap.eraseColor(0);
+ fBitmap.eraseColor(SK_ColorTRANSPARENT);
}
}
diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h
index b637e84..05d5bc0 100644
--- a/src/core/SkScalerContext.h
+++ b/src/core/SkScalerContext.h
@@ -74,7 +74,7 @@
* paint and device gamma to be effectively 1.0.
*/
void ignorePreBlend() {
- setLuminanceColor(0x00000000);
+ setLuminanceColor(SK_ColorTRANSPARENT);
setPaintGamma(SK_Scalar1);
setDeviceGamma(SK_Scalar1);
setContrast(0);