| Index: skia/ext/skia_utils_mac_unittest.mm
|
| diff --git a/skia/ext/skia_utils_mac_unittest.mm b/skia/ext/skia_utils_mac_unittest.mm
|
| index dd467025ffa948c3e9d03e57661597b7df27d209..bd1755fb108cb84d4a4cdee16e7516e1828b97a1 100644
|
| --- a/skia/ext/skia_utils_mac_unittest.mm
|
| +++ b/skia/ext/skia_utils_mac_unittest.mm
|
| @@ -43,13 +43,11 @@ class SkiaUtilsMacTest : public testing::Test {
|
|
|
| SkBitmap SkiaUtilsMacTest::CreateSkBitmap(int width, int height,
|
| bool isred, bool tfbit) {
|
| - SkBitmap bitmap;
|
| + SkColorType ct = tfbit ? kN32_SkColorType : kARGB_4444_SkColorType;
|
| + SkImageInfo info = SkImageInfo::Make(width, height, ct, kPremul_SkAlphaType);
|
|
|
| - if (tfbit)
|
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
|
| - else
|
| - bitmap.setConfig(SkBitmap::kARGB_4444_Config, width, height);
|
| - bitmap.allocPixels();
|
| + SkBitmap bitmap;
|
| + bitmap.allocPixels(info);
|
|
|
| if (isred)
|
| bitmap.eraseARGB(0xff, 0xff, 0, 0);
|
| @@ -123,9 +121,9 @@ void SkiaUtilsMacTest::RunBitLockerTest(BitLockerTest test) {
|
| EXPECT_EQ(storageSize, sizeof(original) / sizeof(original[0]));
|
| unsigned bits[storageSize];
|
| memcpy(bits, original, sizeof(original));
|
| + SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
|
| SkBitmap bitmap;
|
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
|
| - bitmap.setPixels(bits);
|
| + bitmap.installPixels(info, bits, info.minRowBytes());
|
|
|
| SkCanvas canvas(bitmap);
|
| if (test & TestTranslate)
|
|
|