Index: samplecode/SampleUnpremul.cpp |
diff --git a/samplecode/SampleUnpremul.cpp b/samplecode/SampleUnpremul.cpp |
index 58d8ec248c3cb9ac47814b4b5af986b61984ab53..f2f60cc3129e7c3798ba35ccd66f3bcb157fb644 100644 |
--- a/samplecode/SampleUnpremul.cpp |
+++ b/samplecode/SampleUnpremul.cpp |
@@ -125,10 +125,7 @@ protected: |
// Copy it to a bitmap which can be drawn, converting |
// to premultiplied: |
SkBitmap bm; |
- bm.setConfig(SkBitmap::kARGB_8888_Config, fBitmap.width(), |
- fBitmap.height()); |
- SkASSERT(fBitmap.config() == SkBitmap::kARGB_8888_Config); |
- if (!bm.allocPixels()) { |
+ if (!bm.allocN32Pixels(fBitmap.width(), fBitmap.height())) { |
SkString errMsg("allocPixels failed"); |
canvas->drawText(errMsg.c_str(), errMsg.size(), 0, height, paint); |
return; |