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

Unified Diff: src/images/SkMovie_gif.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/images/SkImageDecoder_libwebp.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkMovie_gif.cpp
diff --git a/src/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp
index decefd5acc540751e1a4785f19ead7fe946143a8..3810db566275feb7ed777f02a7e028055d9a8f4f 100644
--- a/src/images/SkMovie_gif.cpp
+++ b/src/images/SkMovie_gif.cpp
@@ -364,11 +364,11 @@ bool SkGIFMovie::onGetBitmap(SkBitmap* bm)
startIndex = 0;
// create bitmap
- if (!bm->allocPixels(SkImageInfo::MakeN32Premul(width, height))) {
+ if (!bm->tryAllocN32Pixels(width, height)) {
return false;
}
// create bitmap for backup
- if (!fBackup.allocPixels(SkImageInfo::MakeN32Premul(width, height))) {
+ if (!fBackup.tryAllocN32Pixels(width, height)) {
return false;
}
} else if (startIndex > fCurrIndex) {
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698