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

Unified Diff: content/browser/android/system_ui_resource_manager_impl.cc

Issue 556463002: Revert of 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/browser/android/system_ui_resource_manager_impl.cc
diff --git a/content/browser/android/system_ui_resource_manager_impl.cc b/content/browser/android/system_ui_resource_manager_impl.cc
index dfbbc5aeb6d81958e8838162d8fa77d036559b93..81f12fc3a70d5d0abde50158258001d4343c7564 100644
--- a/content/browser/android/system_ui_resource_manager_impl.cc
+++ b/content/browser/android/system_ui_resource_manager_impl.cc
@@ -40,7 +40,11 @@
SkRect arc_rect = SkRect::MakeXYWH(
-arc_width / 2.f, -arc_width - y, arc_width * 2.f, arc_width * 2.f);
SkBitmap glow_bitmap;
- glow_bitmap.allocPixels(SkImageInfo::MakeA8(bounds.width(), bounds.height()));
+ if (!glow_bitmap.allocPixels(
+ SkImageInfo::MakeA8(bounds.width(), bounds.height()))) {
+ LOG(FATAL) << " Failed to allocate bitmap of size " << bounds.width() << "x"
+ << bounds.height();
+ }
glow_bitmap.eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(glow_bitmap);
« no previous file with comments | « chrome/browser/ui/cocoa/table_row_nsimage_cache_unittest.mm ('k') | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698