aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
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/win/SkCreatePlatformGLContext_win.cpp
parent435af2f736c85c3274a0c6760a3523810750d237 (diff)
Style Change: NULL->nullptr
Diffstat (limited to 'src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp')
-rw-r--r--src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp b/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
index 0517f73ee4..f795f52554 100644
--- a/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
+++ b/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
@@ -39,23 +39,23 @@ private:
ATOM WinGLContext::gWC = 0;
WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI)
- : fWindow(NULL)
- , fDeviceContext(NULL)
+ : fWindow(nullptr)
+ , fDeviceContext(nullptr)
, fGlRenderContext(0)
- , fPbufferContext(NULL) {
- HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
+ , fPbufferContext(nullptr) {
+ HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(nullptr);
if (!gWC) {
WNDCLASS wc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
- wc.hbrBackground = NULL;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
+ wc.hbrBackground = nullptr;
+ wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
+ wc.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
wc.hInstance = hInstance;
wc.lpfnWndProc = (WNDPROC) DefWindowProc;
wc.lpszClassName = TEXT("Griffin");
- wc.lpszMenuName = NULL;
+ wc.lpszMenuName = nullptr;
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
gWC = RegisterClass(&wc);
@@ -69,8 +69,8 @@ WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI)
TEXT("The Invisible Man"),
WS_OVERLAPPEDWINDOW,
0, 0, 1, 1,
- NULL, NULL,
- hInstance, NULL))) {
+ nullptr, nullptr,
+ hInstance, nullptr))) {
SkDebugf("Could not create window.\n");
return;
}
@@ -91,7 +91,7 @@ WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI)
HDC dc;
HGLRC glrc;
- if (NULL == fPbufferContext) {
+ if (nullptr == fPbufferContext) {
if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, contextType))) {
SkDebugf("Could not create rendering context.\n");
this->destroyGLContext();
@@ -116,7 +116,7 @@ WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI)
}
SkAutoTUnref<const GrGLInterface> gl(GrGLCreateNativeInterface());
- if (NULL == gl.get()) {
+ if (nullptr == gl.get()) {
SkDebugf("Could not create GL interface.\n");
this->destroyGLContext();
return;
@@ -155,7 +155,7 @@ void WinGLContext::onPlatformMakeCurrent() const {
HDC dc;
HGLRC glrc;
- if (NULL == fPbufferContext) {
+ if (nullptr == fPbufferContext) {
dc = fDeviceContext;
glrc = fGlRenderContext;
} else {
@@ -171,7 +171,7 @@ void WinGLContext::onPlatformMakeCurrent() const {
void WinGLContext::onPlatformSwapBuffers() const {
HDC dc;
- if (NULL == fPbufferContext) {
+ if (nullptr == fPbufferContext) {
dc = fDeviceContext;
} else {
dc = fPbufferContext->getDC();
@@ -191,7 +191,7 @@ SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) {
WinGLContext* ctx = new WinGLContext(forcedGpuAPI);
if (!ctx->isValid()) {
delete ctx;
- return NULL;
+ return nullptr;
}
return ctx;
}