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

Unified Diff: src/core/SkMipMap.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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
« no previous file with comments | « src/core/SkMipMap.h ('k') | src/core/SkMultiPictureDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/core/SkMipMap.h ('k') | src/core/SkMultiPictureDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698