diff options
author | reed <reed@google.com> | 2014-09-02 12:50:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-02 12:50:45 -0700 |
commit | 848250415eddc54075f7eb8795e8db79e749c6ab (patch) | |
tree | eb60aea6e61c9b3a9e195ab3cfb01d571351f78b /src/effects/SkMatrixConvolutionImageFilter.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/effects/SkMatrixConvolutionImageFilter.cpp')
-rw-r--r-- | src/effects/SkMatrixConvolutionImageFilter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp index aa8b8049c9..c8959eecfb 100644 --- a/src/effects/SkMatrixConvolutionImageFilter.cpp +++ b/src/effects/SkMatrixConvolutionImageFilter.cpp @@ -265,7 +265,7 @@ static SkBitmap unpremultiplyBitmap(const SkBitmap& src) return SkBitmap(); } SkBitmap result; - if (!result.allocPixels(src.info())) { + if (!result.tryAllocPixels(src.info())) { return SkBitmap(); } for (int y = 0; y < src.height(); ++y) { @@ -307,7 +307,7 @@ bool SkMatrixConvolutionImageFilter::onFilterImage(Proxy* proxy, return false; } - if (!result->allocPixels(src.info().makeWH(bounds.width(), bounds.height()))) { + if (!result->tryAllocPixels(src.info().makeWH(bounds.width(), bounds.height()))) { return false; } |