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

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: can't use (void) to suppress the "must check return result" 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
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) {

Powered by Google App Engine
This is Rietveld 408576698