Chromium Code Reviews

Unified Diff: src/pdf/SkPDFDevice.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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/lazy/SkDiscardablePixelRef.cpp ('k') | src/pdf/SkPDFImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index ec07a8ff0ed42b8872fb78bdbd3296632180b84a..f4ea694451d93433c797aeae6f8be78b11b10bd0 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -2120,7 +2120,7 @@ void SkPDFDevice::internalDrawBitmap(const SkMatrix& origMatrix,
const int w = SkScalarCeilToInt(physicalPerspectiveOutline.getBounds().width());
const int h = SkScalarCeilToInt(physicalPerspectiveOutline.getBounds().height());
- if (!perspectiveBitmap.allocPixels(SkImageInfo::MakeN32Premul(w, h))) {
+ if (!perspectiveBitmap.tryAllocN32Pixels(w, h)) {
return;
}
perspectiveBitmap.eraseColor(SK_ColorTRANSPARENT);
« no previous file with comments | « src/lazy/SkDiscardablePixelRef.cpp ('k') | src/pdf/SkPDFImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine