Index: gm/bitmappremul.cpp |
diff --git a/gm/bitmappremul.cpp b/gm/bitmappremul.cpp |
index 57d22d700a7c83b2415cca2c858ac83732b82ede..fd563eb7757367320bcce284d416e1d2e4acbcf9 100644 |
--- a/gm/bitmappremul.cpp |
+++ b/gm/bitmappremul.cpp |
@@ -22,14 +22,15 @@ static const int SLIDE_SIZE = 256; |
static const int PIXEL_SIZE_8888 = SLIDE_SIZE / 256; |
static const int PIXEL_SIZE_4444 = SLIDE_SIZE / 16; |
-static void init_bitmap(SkBitmap::Config config, SkBitmap* bitmap) { |
- bitmap->allocConfigPixels(config, SLIDE_SIZE, SLIDE_SIZE); |
+static void init_bitmap(SkColorType ct, SkBitmap* bitmap) { |
+ bitmap->allocPixels(SkImageInfo::Make(SLIDE_SIZE, SLIDE_SIZE, ct, |
+ kPremul_SkAlphaType)); |
bitmap->eraseColor(SK_ColorWHITE); |
} |
static SkBitmap make_argb8888_gradient() { |
SkBitmap bitmap; |
- init_bitmap(SkBitmap::kARGB_8888_Config, &bitmap); |
+ init_bitmap(kPMColor_SkColorType, &bitmap); |
uint8_t rowColor = 0; |
for (int y = 0; y < SLIDE_SIZE; y++) { |
uint32_t* dst = bitmap.getAddr32(0, y); |
@@ -46,7 +47,7 @@ static SkBitmap make_argb8888_gradient() { |
static SkBitmap make_argb4444_gradient() { |
SkBitmap bitmap; |
- init_bitmap(SkBitmap::kARGB_4444_Config, &bitmap); |
+ init_bitmap(kARGB_4444_SkColorType, &bitmap); |
uint8_t rowColor = 0; |
for (int y = 0; y < SLIDE_SIZE; y++) { |
uint16_t* dst = bitmap.getAddr16(0, y); |
@@ -63,7 +64,7 @@ static SkBitmap make_argb4444_gradient() { |
static SkBitmap make_argb8888_stripes() { |
SkBitmap bitmap; |
- init_bitmap(SkBitmap::kARGB_8888_Config, &bitmap); |
+ init_bitmap(kPMColor_SkColorType, &bitmap); |
uint8_t rowColor = 0; |
for (int y = 0; y < SLIDE_SIZE; y++) { |
uint32_t* dst = bitmap.getAddr32(0, y); |
@@ -82,7 +83,7 @@ static SkBitmap make_argb8888_stripes() { |
static SkBitmap make_argb4444_stripes() { |
SkBitmap bitmap; |
- init_bitmap(SkBitmap::kARGB_4444_Config, &bitmap); |
+ init_bitmap(kARGB_4444_SkColorType, &bitmap); |
uint8_t rowColor = 0;; |
for (int y = 0; y < SLIDE_SIZE; y++) { |
uint16_t* dst = bitmap.getAddr16(0, y); |