Index: samplecode/SampleUnpremul.cpp |
diff --git a/samplecode/SampleUnpremul.cpp b/samplecode/SampleUnpremul.cpp |
index bfe69e0b50e2b3246e88227ba0940e32e94a5600..992444d05d060a426ec49f39afa24c2249d215e7 100644 |
--- a/samplecode/SampleUnpremul.cpp |
+++ b/samplecode/SampleUnpremul.cpp |
@@ -128,11 +128,7 @@ protected: |
// Copy it to a bitmap which can be drawn, converting |
// to premultiplied: |
SkBitmap bm; |
- if (!bm.allocN32Pixels(fBitmap.width(), fBitmap.height())) { |
- SkString errMsg("allocPixels failed"); |
- canvas->drawText(errMsg.c_str(), errMsg.size(), 0, height, paint); |
- return; |
- } |
+ bm.allocN32Pixels(fBitmap.width(), fBitmap.height()); |
for (int i = 0; i < fBitmap.width(); ++i) { |
for (int j = 0; j < fBitmap.height(); ++j) { |
*bm.getAddr32(i, j) = premultiply_unpmcolor(*fBitmap.getAddr32(i, j)); |