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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 510423005: make allocPixels throw on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: can't use (void) to suppress the "must check return result" 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
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 4054d5565a1472cf75da1d1483ca0fc3b583f0e8..ec1f26f4877bbd5dc00f0acdf379ffb60225d49e 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -254,7 +254,7 @@ bool SkDisplacementMapEffect::onFilterImage(Proxy* proxy,
return false;
}
- if (!dst->allocPixels(color.info().makeWH(bounds.width(), bounds.height()))) {
+ if (!dst->tryAllocPixels(color.info().makeWH(bounds.width(), bounds.height()))) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698