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

Unified Diff: src/core/SkBitmap.cpp

Issue 510423005: make allocPixels throw on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
« include/core/SkBitmap.h ('K') | « include/core/SkBitmap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index d83199ddc49fd9597ce2d9f6e7927cabf115a127..a9b802c82fdb53ccae90b2026fa28728d36fba85 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -279,7 +279,7 @@ bool SkBitmap::allocPixels(Allocator* allocator, SkColorTable* ctable) {
///////////////////////////////////////////////////////////////////////////////
-bool SkBitmap::allocPixels(const SkImageInfo& requestedInfo, size_t rowBytes) {
+bool SkBitmap::allocPixelsCheck(const SkImageInfo& requestedInfo, size_t rowBytes) {
if (kIndex_8_SkColorType == requestedInfo.colorType()) {
return reset_return_false(this);
}
@@ -308,8 +308,8 @@ bool SkBitmap::allocPixels(const SkImageInfo& requestedInfo, size_t rowBytes) {
return true;
}
-bool SkBitmap::allocPixels(const SkImageInfo& requestedInfo, SkPixelRefFactory* factory,
- SkColorTable* ctable) {
+bool SkBitmap::allocPixelsCheck(const SkImageInfo& requestedInfo, SkPixelRefFactory* factory,
+ SkColorTable* ctable) {
if (kIndex_8_SkColorType == requestedInfo.fColorType && NULL == ctable) {
return reset_return_false(this);
}
« include/core/SkBitmap.h ('K') | « include/core/SkBitmap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698