Chromium Code Reviews| Index: src/core/SkMallocPixelRef.cpp |
| diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp |
| index 12aa1f63d6197c1e189e6ca877df4b3d7694d923..35075d8f58313bf3cdb1743067672b4ac552428f 100644 |
| --- a/src/core/SkMallocPixelRef.cpp |
| +++ b/src/core/SkMallocPixelRef.cpp |
| @@ -53,15 +53,18 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info, |
| size_t requestedRowBytes, |
| SkColorTable* ctable) { |
| if (!is_valid(info, ctable)) { |
| + SkDebugf("failing 1\n"); |
|
scroggo
2015/06/30 20:50:04
I think you didn't mean to include the changes to
|
| return NULL; |
| } |
| // only want to permit 31bits of rowBytes |
| int64_t minRB = (int64_t)info.minRowBytes64(); |
| if (minRB < 0 || !sk_64_isS32(minRB)) { |
| + SkDebugf("failing 2\n"); |
| return NULL; // allocation will be too large |
| } |
| if (requestedRowBytes > 0 && (int32_t)requestedRowBytes < minRB) { |
| + SkDebugf("failing 3\n"); |
| return NULL; // cannot meet requested rowbytes |
| } |
| @@ -74,6 +77,7 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info, |
| int64_t bigSize = (int64_t)info.height() * rowBytes; |
| if (!sk_64_isS32(bigSize)) { |
| + SkDebugf("failing 4\n"); |
| return NULL; |
| } |
| @@ -81,6 +85,7 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info, |
| SkASSERT(size >= info.getSafeSize(rowBytes)); |
| void* addr = sk_malloc_flags(size, 0); |
| if (NULL == addr) { |
| + SkDebugf("failing 5\n"); |
| return NULL; |
| } |