make allocPixels throw on failure
BUG=skia:
R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/510423005
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp
index dfa093b..5c66c94 100644
--- a/src/images/SkDecodingImageGenerator.cpp
+++ b/src/images/SkDecodingImageGenerator.cpp
@@ -69,7 +69,7 @@
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