Index: src/core/SkMipMap.cpp |
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp |
index 8a62f88ab2a65c992c33c97bb5de45c0fbedd0e1..6e0aaed6973e174e0359d607e7305e299c3ed1cc 100644 |
--- a/src/core/SkMipMap.cpp |
+++ b/src/core/SkMipMap.cpp |
@@ -206,7 +206,7 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src, SkDiscardableFactoryProc fact) { |
proc_nocheck = downsample8_nocheck; |
break; |
default: |
- return NULL; // don't build mipmaps for any other colortypes (yet) |
+ return nullptr; // don't build mipmaps for any other colortypes (yet) |
} |
// whip through our loop to compute the exact size needed |
@@ -226,29 +226,29 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src, SkDiscardableFactoryProc fact) { |
} |
} |
if (0 == countLevels) { |
- return NULL; |
+ return nullptr; |
} |
size_t storageSize = SkMipMap::AllocLevelsSize(countLevels, size); |
if (0 == storageSize) { |
- return NULL; |
+ return nullptr; |
} |
SkAutoPixmapUnlock srcUnlocker; |
if (!src.requestLock(&srcUnlocker)) { |
- return NULL; |
+ return nullptr; |
} |
const SkPixmap& srcPixmap = srcUnlocker.pixmap(); |
- // Try to catch where we might have returned NULL for src crbug.com/492818 |
- if (NULL == srcPixmap.addr()) { |
+ // Try to catch where we might have returned nullptr for src crbug.com/492818 |
+ if (nullptr == srcPixmap.addr()) { |
sk_throw(); |
} |
SkMipMap* mipmap; |
if (fact) { |
SkDiscardableMemory* dm = fact(storageSize); |
- if (NULL == dm) { |
- return NULL; |
+ if (nullptr == dm) { |
+ return nullptr; |
} |
mipmap = new SkMipMap(storageSize, dm); |
} else { |
@@ -321,7 +321,7 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src, SkDiscardableFactoryProc fact) { |
/////////////////////////////////////////////////////////////////////////////// |
bool SkMipMap::extractLevel(SkScalar scale, Level* levelPtr) const { |
- if (NULL == fLevels) { |
+ if (nullptr == fLevels) { |
return false; |
} |