Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: src/utils/SkPDFRasterizer.cpp

Issue 510423005: make allocPixels throw on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFImage.cpp ('k') | src/utils/mac/SkCreateCGImageRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkPDFRasterizer.cpp
diff --git a/src/utils/SkPDFRasterizer.cpp b/src/utils/SkPDFRasterizer.cpp
index 66634804bc6aa2371ecf983eae50fb8a16c5d5d8..1cb792fb817084cd002af0f68905a6776daf6ce8 100644
--- a/src/utils/SkPDFRasterizer.cpp
+++ b/src/utils/SkPDFRasterizer.cpp
@@ -50,7 +50,7 @@ bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) {
char *imgData = image.data();
SkBitmap bitmap;
- if (!bitmap.allocPixels(SkImageInfo::MakeN32Premul(width, height))) {
+ if (!bitmap.tryAllocN32Pixels(width, height)) {
return false;
}
bitmap.eraseColor(SK_ColorWHITE);
« no previous file with comments | « src/pdf/SkPDFImage.cpp ('k') | src/utils/mac/SkCreateCGImageRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698