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

Unified Diff: src/images/SkDecodingImageGenerator.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/image/SkImage.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkDecodingImageGenerator.cpp
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp
index dfa093becc5d5ff7162727729d04e175fe1d18f0..5c66c94a534e257d01d09d2f0a7bbe595de96bfa 100644
--- a/src/images/SkDecodingImageGenerator.cpp
+++ b/src/images/SkDecodingImageGenerator.cpp
@@ -69,7 +69,7 @@ public:
virtual bool allocPixelRef(SkBitmap* bm, SkColorTable* ct) {
if (NULL == fTarget || !equal_modulo_alpha(fInfo, bm->info())) {
// Call default allocator.
- return bm->allocPixels(NULL, ct);
+ return bm->tryAllocPixels(NULL, ct);
}
// TODO(halcanary): verify that all callers of this function
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698