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

Unified Diff: samplecode/SampleFilterFuzz.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 | « samplecode/SampleApp.cpp ('k') | samplecode/SampleUnpremul.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 8aa48ed5c9ca5375759e4f958bb50ef3a09cc4b3..f4157cd6b545d0e2c871c24b9ab6cca7dbd3eb8b 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -153,7 +153,7 @@ static void rand_bitmap_for_canvas(SkBitmap* bitmap) {
do {
info = SkImageInfo::Make(kBitmapSize, kBitmapSize, rand_colortype(),
kPremul_SkAlphaType);
- } while (!valid_for_raster_canvas(info) || !bitmap->allocPixels(info));
+ } while (!valid_for_raster_canvas(info) || !bitmap->tryAllocPixels(info));
}
static void make_g_bitmap(SkBitmap& bitmap) {
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleUnpremul.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698