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

Unified Diff: src/gpu/gl/mac/SkCreatePlatformGLContext_mac.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/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp ('k') | src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
diff --git a/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp b/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
index 4754c0155741d243060fd9921f124c20244aafbe..fa4126a62c2312800c683929f5bcb38f87746e52 100644
--- a/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
+++ b/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
@@ -29,7 +29,7 @@ private:
};
MacGLContext::MacGLContext()
- : fContext(NULL)
+ : fContext(nullptr)
, fGLLibrary(RTLD_DEFAULT) {
CGLPixelFormatAttribute attributes[] = {
#if MAC_OS_X_VERSION_10_7
@@ -43,15 +43,15 @@ MacGLContext::MacGLContext()
CGLChoosePixelFormat(attributes, &pixFormat, &npix);
- if (NULL == pixFormat) {
+ if (nullptr == pixFormat) {
SkDebugf("CGLChoosePixelFormat failed.");
return;
}
- CGLCreateContext(pixFormat, NULL, &fContext);
+ CGLCreateContext(pixFormat, nullptr, &fContext);
CGLReleasePixelFormat(pixFormat);
- if (NULL == fContext) {
+ if (nullptr == fContext) {
SkDebugf("CGLCreateContext failed.");
return;
}
@@ -59,7 +59,7 @@ MacGLContext::MacGLContext()
CGLSetCurrentContext(fContext);
SkAutoTUnref<const GrGLInterface> gl(GrGLCreateNativeInterface());
- if (NULL == gl.get()) {
+ if (nullptr == gl.get()) {
SkDebugf("Context could not create GL interface.\n");
this->destroyGLContext();
return;
@@ -85,7 +85,7 @@ MacGLContext::~MacGLContext() {
void MacGLContext::destroyGLContext() {
if (fContext) {
CGLReleaseContext(fContext);
- fContext = NULL;
+ fContext = nullptr;
}
if (RTLD_DEFAULT != fGLLibrary) {
dlclose(fGLLibrary);
@@ -108,12 +108,12 @@ GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const {
SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) {
if (kGLES_GrGLStandard == forcedGpuAPI) {
- return NULL;
+ return nullptr;
}
MacGLContext* ctx = new MacGLContext;
if (!ctx->isValid()) {
delete ctx;
- return NULL;
+ return nullptr;
}
return ctx;
}
« no previous file with comments | « src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp ('k') | src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698