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

Unified Diff: skia/ext/bitmap_platform_device_mac.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 | « skia/config/SkUserConfig.h ('k') | skia/ext/bitmap_platform_device_skia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_mac.cc
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 8cd492059a779b6f3d8d76f9a25f0801b919e2c9..5204468bce952e2ac6262ae60848b53eadcfbcf5 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -110,7 +110,7 @@ BitmapPlatformDevice* BitmapPlatformDevice::Create(CGContextRef context,
data = CGBitmapContextGetData(context);
bitmap.setPixels(data);
} else {
- if (!bitmap.allocPixels())
+ if (!bitmap.tryAllocPixels())
return NULL;
data = bitmap.getPixels();
}
@@ -271,7 +271,7 @@ bool PlatformBitmap::Allocate(int width, int height, bool is_opaque) {
if (RasterDeviceTooBigToAllocate(width, height))
return false;
- if (!bitmap_.allocN32Pixels(width, height, is_opaque))
+ if (!bitmap_.tryAllocN32Pixels(width, height, is_opaque))
return false;
if (!is_opaque)
« no previous file with comments | « skia/config/SkUserConfig.h ('k') | skia/ext/bitmap_platform_device_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698