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

Unified Diff: src/image/SkSurface_Raster.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/image/SkSurface_Gpu.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698