Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 510423005: make allocPixels throw on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurImageFilter.cpp
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index d08209874bdad74be11d035fd8f2ac9cf976725d..8590400003eba2ffb8aae2eb255abcc00e207f0a 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -172,7 +172,7 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
return false;
}
- if (!dst->allocPixels(src.info().makeWH(srcBounds.width(), srcBounds.height()))) {
+ if (!dst->tryAllocPixels(src.info().makeWH(srcBounds.width(), srcBounds.height()))) {
return false;
}
dst->getBounds(&dstBounds);
@@ -199,7 +199,7 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
}
SkBitmap temp;
- if (!temp.allocPixels(dst->info())) {
+ if (!temp.tryAllocPixels(dst->info())) {
return false;
}
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698