Index: gm/downsamplebitmap.cpp |
diff --git a/gm/downsamplebitmap.cpp b/gm/downsamplebitmap.cpp |
index 034538c15c08bbe8864f5820a66b3be34d9a7e38..4b97804b01f74e70c627f5ecc80319d37a2eb943 100644 |
--- a/gm/downsamplebitmap.cpp |
+++ b/gm/downsamplebitmap.cpp |
@@ -99,8 +99,7 @@ class DownsampleBitmapTextGM: public DownsampleBitmapGM { |
float fTextSize; |
virtual void make_bitmap() SK_OVERRIDE { |
- fBM.setConfig(SkBitmap::kARGB_8888_Config, int(fTextSize * 8), int(fTextSize * 6)); |
- fBM.allocPixels(); |
+ fBM.allocN32Pixels(int(fTextSize * 8), int(fTextSize * 6)); |
SkCanvas canvas(fBM); |
canvas.drawColor(SK_ColorWHITE); |
@@ -135,9 +134,7 @@ class DownsampleBitmapCheckerboardGM: public DownsampleBitmapGM { |
int fNumChecks; |
virtual void make_bitmap() SK_OVERRIDE { |
- fBM.setConfig(SkBitmap::kARGB_8888_Config, fSize, fSize); |
- fBM.allocPixels(); |
- SkAutoLockPixels lock(fBM); |
+ fBM.allocN32Pixels(fSize, fSize); |
for (int y = 0; y < fSize; ++y) { |
for (int x = 0; x < fSize; ++x) { |
SkPMColor* s = fBM.getAddr32(x, y); |
@@ -183,8 +180,7 @@ class DownsampleBitmapImageGM: public DownsampleBitmapGM { |
SkImageDecoder::kDecodePixels_Mode); |
SkDELETE(codec); |
} else { |
- fBM.setConfig(SkBitmap::kARGB_8888_Config, 1, 1); |
- fBM.allocPixels(); |
+ fBM.allocN32Pixels(1, 1); |
*(fBM.getAddr32(0,0)) = 0xFF0000FF; // red == bad |
} |
fSize = fBM.height(); |