aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/mac
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-08-27 07:41:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-27 07:41:16 -0700
commit96fcdcc219d2a0d3579719b84b28bede76efba64 (patch)
tree0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/gpu/gl/mac
parent435af2f736c85c3274a0c6760a3523810750d237 (diff)
Style Change: NULL->nullptr
Diffstat (limited to 'src/gpu/gl/mac')
-rw-r--r--src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp2
-rw-r--r--src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp16
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;
}