| Index: src/utils/mac/SkCreateCGImageRef.cpp
|
| diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp
|
| index 0677b7bc304399b4aa6ffebd56992d16c99252fd..1b52ba31a695300f63933426d8f0187e40a9c8b6 100644
|
| --- a/src/utils/mac/SkCreateCGImageRef.cpp
|
| +++ b/src/utils/mac/SkCreateCGImageRef.cpp
|
| @@ -209,8 +209,9 @@ bool SkPDFDocumentToBitmap(SkStream* stream, SkBitmap* output) {
|
| int h = (int)CGRectGetHeight(bounds);
|
|
|
| SkBitmap bitmap;
|
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config, w, h);
|
| - bitmap.allocPixels();
|
| + if (!bitmap.allocPixels(SkImageInfo::MakeN32Premul(w, h))) {
|
| + return false;
|
| + }
|
| bitmap.eraseColor(SK_ColorWHITE);
|
|
|
| size_t bitsPerComponent;
|
|
|