replace setConfig+allocPixels with single call
BUG=skia:
Review URL: https://codereview.chromium.org/162643002
git-svn-id: http://skia.googlecode.com/svn/trunk@13426 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 2e0225a..7b2f988 100644
--- a/tests/ImageDecodingTest.cpp
+++ b/tests/ImageDecodingTest.cpp
@@ -168,8 +168,7 @@
static SkMemoryStream* create_image_stream(SkImageEncoder::Type type) {
SkBitmap bm;
const int size = 50;
- bm.setConfig(SkBitmap::kARGB_8888_Config, size, size);
- bm.allocPixels();
+ bm.allocN32Pixels(size, size);
SkCanvas canvas(bm);
SkPoint points[2] = {
{ SkIntToScalar(0), SkIntToScalar(0) },
@@ -363,7 +362,7 @@
SkStream::NewFromFile(path.c_str()));
if (sk_exists(path.c_str())) {
SkBitmap bm;
- SkAssertResult(bm.setConfig(SkBitmap::kARGB_8888_Config, 1, 1));
+ SkAssertResult(bm.setConfig(SkImageInfo::MakeN32Premul(1, 1)));
REPORTER_ASSERT(reporter,
NULL != install_pixel_ref(&bm, stream.detach(), 1, true));
SkAutoLockPixels alp(bm);