| Index: src/core/SkMallocPixelRef.cpp
|
| diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp
|
| index 0d50164832a0cbe306fda48c9ea1f55e41e1361c..ae29310aeaa1c98ada34da6b5c403c4cdef99cf9 100644
|
| --- a/src/core/SkMallocPixelRef.cpp
|
| +++ b/src/core/SkMallocPixelRef.cpp
|
| @@ -16,10 +16,9 @@ static void sk_free_releaseproc(void* ptr, void*) {
|
| }
|
|
|
| static bool is_valid(const SkImageInfo& info, SkColorTable* ctable) {
|
| - if (info.fWidth < 0 ||
|
| - info.fHeight < 0 ||
|
| - (unsigned)info.fColorType > (unsigned)kLastEnum_SkColorType ||
|
| - (unsigned)info.fAlphaType > (unsigned)kLastEnum_SkAlphaType)
|
| + if (info.width() < 0 || info.height() < 0 ||
|
| + (unsigned)info.colorType() > (unsigned)kLastEnum_SkColorType ||
|
| + (unsigned)info.alphaType() > (unsigned)kLastEnum_SkAlphaType)
|
| {
|
| return false;
|
| }
|
| @@ -72,7 +71,7 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info,
|
| rowBytes = minRB;
|
| }
|
|
|
| - int64_t bigSize = (int64_t)info.fHeight * rowBytes;
|
| + int64_t bigSize = (int64_t)info.height() * rowBytes;
|
| if (!sk_64_isS32(bigSize)) {
|
| return NULL;
|
| }
|
| @@ -142,7 +141,7 @@ SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage,
|
| SkASSERT(is_valid(info, ctable));
|
| SkASSERT(rowBytes >= info.minRowBytes());
|
|
|
| - if (kIndex_8_SkColorType != info.fColorType) {
|
| + if (kIndex_8_SkColorType != info.colorType()) {
|
| ctable = NULL;
|
| }
|
|
|
| @@ -165,7 +164,7 @@ SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage,
|
| SkASSERT(is_valid(info, ctable));
|
| SkASSERT(rowBytes >= info.minRowBytes());
|
|
|
| - if (kIndex_8_SkColorType != info.fColorType) {
|
| + if (kIndex_8_SkColorType != info.colorType()) {
|
| ctable = NULL;
|
| }
|
|
|
|
|