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

Unified Diff: content/renderer/skia_benchmarking_extension.cc

Issue 545513002: tryAllocPixels returns bool, allocPixels requires success (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/renderer/skia_benchmarking_extension.cc
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc
index 31e7d34e9a1bb39080ea595f383a2101ec613e5c..6d29155b141d0e1ac4c4a039115110c34457d2a8 100644
--- a/content/renderer/skia_benchmarking_extension.cc
+++ b/content/renderer/skia_benchmarking_extension.cc
@@ -158,7 +158,7 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) {
gfx::Rect snapped_clip = gfx::ToEnclosingRect(clip);
SkBitmap bitmap;
- if (!bitmap.allocN32Pixels(snapped_clip.width(), snapped_clip.height()))
+ if (!bitmap.tryAllocN32Pixels(snapped_clip.width(), snapped_clip.height()))
return;
bitmap.eraseARGB(0, 0, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698