diff options
author | 2014-09-02 12:50:45 -0700 | |
---|---|---|
committer | 2014-09-02 12:50:45 -0700 | |
commit | 848250415eddc54075f7eb8795e8db79e749c6ab (patch) | |
tree | eb60aea6e61c9b3a9e195ab3cfb01d571351f78b /src/core/SkScalerContext.cpp | |
parent | 00f30bdc9e34b013da54b4406f36556c5be8d041 (diff) |
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
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r-- | src/core/SkScalerContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index db3c0fb2f5..4d7f3629eb 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -437,7 +437,7 @@ static void generateMask(const SkMask& mask, const SkPath& path, SkBitmap bm; if (0 == dstRB) { - if (!bm.allocPixels(info)) { + if (!bm.tryAllocPixels(info)) { // can't allocate offscreen, so empty the mask and return sk_bzero(mask.fImage, mask.computeImageSize()); return; |