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/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index a07fe67..54497fe 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -25,8 +25,7 @@
bool GrSurface::savePixels(const char* filename) {
SkBitmap bm;
- if (!bm.allocPixels(SkImageInfo::MakeN32Premul(this->width(),
- this->height()))) {
+ if (!bm.tryAllocPixels(SkImageInfo::MakeN32Premul(this->width(), this->height()))) {
return false;
}