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

Unified Diff: src/utils/mac/SkCreateCGImageRef.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/utils/debugger/SkObjectParser.cpp ('k') | src/utils/win/SkAutoCoInitialize.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/mac/SkCreateCGImageRef.cpp
diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp
index 4675d7185eb6a3813c1d17abef1511a4e9d49ee8..0cbf704a416ea117ba5819f1823f27089c4b2a3c 100644
--- a/src/utils/mac/SkCreateCGImageRef.cpp
+++ b/src/utils/mac/SkCreateCGImageRef.cpp
@@ -101,7 +101,7 @@ static SkBitmap* prepareForImageRef(const SkBitmap& bm,
CGBitmapInfo* info) {
bool upscaleTo32;
if (!getBitmapInfo(bm, bitsPerComponent, info, &upscaleTo32)) {
- return NULL;
+ return nullptr;
}
SkBitmap* copy;
@@ -122,8 +122,8 @@ CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm,
CGBitmapInfo info SK_INIT_TO_AVOID_WARNING;
SkBitmap* bitmap = prepareForImageRef(bm, &bitsPerComponent, &info);
- if (NULL == bitmap) {
- return NULL;
+ if (nullptr == bitmap) {
+ return nullptr;
}
const int w = bitmap->width();
@@ -138,7 +138,7 @@ CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm,
SkBitmap_ReleaseInfo);
bool releaseColorSpace = false;
- if (NULL == colorSpace) {
+ if (nullptr == colorSpace) {
colorSpace = CGColorSpaceCreateDeviceRGB();
releaseColorSpace = true;
}
@@ -146,7 +146,7 @@ CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm,
CGImageRef ref = CGImageCreate(w, h, bitsPerComponent,
bitmap->bytesPerPixel() * 8,
bitmap->rowBytes(), colorSpace, info, dataRef,
- NULL, false, kCGRenderingIntentDefault);
+ nullptr, false, kCGRenderingIntentDefault);
if (releaseColorSpace) {
CGColorSpaceRelease(colorSpace);
@@ -192,19 +192,19 @@ private:
bool SkPDFDocumentToBitmap(SkStream* stream, SkBitmap* output) {
CGDataProviderRef data = SkCreateDataProviderFromStream(stream);
- if (NULL == data) {
+ if (nullptr == data) {
return false;
}
CGPDFDocumentRef pdf = CGPDFDocumentCreateWithProvider(data);
CGDataProviderRelease(data);
- if (NULL == pdf) {
+ if (nullptr == pdf) {
return false;
}
SkAutoPDFRelease releaseMe(pdf);
CGPDFPageRef page = CGPDFDocumentGetPage(pdf, 1);
- if (NULL == page) {
+ if (nullptr == page) {
return false;
}
@@ -221,7 +221,7 @@ bool SkPDFDocumentToBitmap(SkStream* stream, SkBitmap* output) {
size_t bitsPerComponent;
CGBitmapInfo info;
- getBitmapInfo(bitmap, &bitsPerComponent, &info, NULL);
+ getBitmapInfo(bitmap, &bitsPerComponent, &info, nullptr);
CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB();
CGContextRef ctx = CGBitmapContextCreate(bitmap.getPixels(), w, h,
@@ -261,7 +261,7 @@ SK_API bool SkCopyPixelsFromCGImage(const SkImageInfo& info, size_t rowBytes, vo
CGContextRef cg = CGBitmapContextCreate(pixels, info.width(), info.height(), bitsPerComponent,
rowBytes, cs, cg_bitmap_info);
CFRelease(cs);
- if (NULL == cg) {
+ if (nullptr == cg) {
return false;
}
« no previous file with comments | « src/utils/debugger/SkObjectParser.cpp ('k') | src/utils/win/SkAutoCoInitialize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698