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

Unified Diff: ui/gfx/ipc/gfx_param_traits.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
« no previous file with comments | « ui/gfx/android/java_bitmap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ipc/gfx_param_traits.cc
diff --git a/ui/gfx/ipc/gfx_param_traits.cc b/ui/gfx/ipc/gfx_param_traits.cc
index dd78e7b88655eb26647e0fe134b012059b6620c6..caf1a2362d0b5d80d85619a6af9cec260f06f811 100644
--- a/ui/gfx/ipc/gfx_param_traits.cc
+++ b/ui/gfx/ipc/gfx_param_traits.cc
@@ -37,7 +37,7 @@ struct SkBitmap_Data {
bool InitSkBitmapFromData(SkBitmap* bitmap,
const char* pixels,
size_t pixels_size) const {
- if (!bitmap->allocPixels(
+ if (!bitmap->tryAllocPixels(
SkImageInfo::Make(fWidth, fHeight, fColorType, fAlphaType)))
return false;
if (pixels_size != bitmap->getSize())
« no previous file with comments | « ui/gfx/android/java_bitmap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698