Index: src/image/SkSurface_Raster.cpp |
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp |
index 3c88f7a4c8b1cde10f95be9765bd897d77aa1a00..7ee09c1eede41b500c3cd9fd3cc9237ad543e1f0 100644 |
--- a/src/image/SkSurface_Raster.cpp |
+++ b/src/image/SkSurface_Raster.cpp |
@@ -87,7 +87,7 @@ SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, void* pixels, size_t |
const SkSurfaceProps* props) |
: INHERITED(info, props) |
{ |
- fBitmap.installPixels(info, pixels, rb, NULL, releaseProc, context); |
+ fBitmap.installPixels(info, pixels, rb, nullptr, releaseProc, context); |
fWeOwnThePixels = false; // We are "Direct" |
} |
@@ -143,7 +143,7 @@ void SkSurface_Raster::onCopyOnWrite(ContentChangeMode mode) { |
if (SkBitmapImageGetPixelRef(this->getCachedImage(kNo_Budgeted)) == fBitmap.pixelRef()) { |
SkASSERT(fWeOwnThePixels); |
if (kDiscard_ContentChangeMode == mode) { |
- fBitmap.setPixelRef(NULL); |
+ fBitmap.setPixelRef(nullptr); |
fBitmap.allocPixels(); |
} else { |
SkBitmap prev(fBitmap); |
@@ -162,14 +162,14 @@ void SkSurface_Raster::onCopyOnWrite(ContentChangeMode mode) { |
SkSurface* SkSurface::NewRasterDirectReleaseProc(const SkImageInfo& info, void* pixels, size_t rb, |
void (*releaseProc)(void* pixels, void* context), |
void* context, const SkSurfaceProps* props) { |
- if (NULL == releaseProc) { |
- context = NULL; |
+ if (nullptr == releaseProc) { |
+ context = nullptr; |
} |
if (!SkSurface_Raster::Valid(info, rb)) { |
- return NULL; |
+ return nullptr; |
} |
- if (NULL == pixels) { |
- return NULL; |
+ if (nullptr == pixels) { |
+ return nullptr; |
} |
return new SkSurface_Raster(info, pixels, rb, releaseProc, context, props); |
@@ -177,17 +177,17 @@ SkSurface* SkSurface::NewRasterDirectReleaseProc(const SkImageInfo& info, void* |
SkSurface* SkSurface::NewRasterDirect(const SkImageInfo& info, void* pixels, size_t rowBytes, |
const SkSurfaceProps* props) { |
- return NewRasterDirectReleaseProc(info, pixels, rowBytes, NULL, NULL, props); |
+ return NewRasterDirectReleaseProc(info, pixels, rowBytes, nullptr, nullptr, props); |
} |
SkSurface* SkSurface::NewRaster(const SkImageInfo& info, const SkSurfaceProps* props) { |
if (!SkSurface_Raster::Valid(info)) { |
- return NULL; |
+ return nullptr; |
} |
- SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, NULL)); |
- if (NULL == pr.get()) { |
- return NULL; |
+ SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, nullptr)); |
+ if (nullptr == pr.get()) { |
+ return nullptr; |
} |
return new SkSurface_Raster(pr, props); |
} |