From 848250415eddc54075f7eb8795e8db79e749c6ab Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 2 Sep 2014 12:50:45 -0700 Subject: 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 --- src/effects/SkMatrixConvolutionImageFilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/effects/SkMatrixConvolutionImageFilter.cpp') 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; } -- cgit v1.2.3