diff options
author | 2015-08-27 07:41:13 -0700 | |
---|---|---|
committer | 2015-08-27 07:41:16 -0700 | |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/gpu/gl/mac | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'src/gpu/gl/mac')
-rw-r--r-- | src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp b/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp index a0c50c7409..9a2abfe066 100644 --- a/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp +++ b/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp @@ -27,7 +27,7 @@ public: } void* handle() const { - return NULL == fLibrary ? RTLD_DEFAULT : fLibrary; + return nullptr == fLibrary ? RTLD_DEFAULT : fLibrary; } private: diff --git a/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp b/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp index 4754c01557..fa4126a62c 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; } |