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

Side by Side Diff: src/gpu/gl/angle/SkANGLEGLContext.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, 3 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 unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gl/angle/SkANGLEGLContext.h" 9 #include "gl/angle/SkANGLEGLContext.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 EGLint minorVersion; 73 EGLint minorVersion;
74 eglInitialize(fDisplay, &majorVersion, &minorVersion); 74 eglInitialize(fDisplay, &majorVersion, &minorVersion);
75 75
76 EGLConfig surfaceConfig; 76 EGLConfig surfaceConfig;
77 eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs); 77 eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs);
78 78
79 static const EGLint contextAttribs[] = { 79 static const EGLint contextAttribs[] = {
80 EGL_CONTEXT_CLIENT_VERSION, 2, 80 EGL_CONTEXT_CLIENT_VERSION, 2,
81 EGL_NONE 81 EGL_NONE
82 }; 82 };
83 fContext = eglCreateContext(fDisplay, surfaceConfig, NULL, contextAttribs); 83 fContext = eglCreateContext(fDisplay, surfaceConfig, nullptr, contextAttribs );
84 84
85 85
86 static const EGLint surfaceAttribs[] = { 86 static const EGLint surfaceAttribs[] = {
87 EGL_WIDTH, 1, 87 EGL_WIDTH, 1,
88 EGL_HEIGHT, 1, 88 EGL_HEIGHT, 1,
89 EGL_NONE 89 EGL_NONE
90 }; 90 };
91 91
92 fSurface = eglCreatePbufferSurface(fDisplay, surfaceConfig, surfaceAttribs); 92 fSurface = eglCreatePbufferSurface(fDisplay, surfaceConfig, surfaceAttribs);
93 93
94 eglMakeCurrent(fDisplay, fSurface, fSurface, fContext); 94 eglMakeCurrent(fDisplay, fSurface, fSurface, fContext);
95 95
96 SkAutoTUnref<const GrGLInterface> gl(GrGLCreateANGLEInterface()); 96 SkAutoTUnref<const GrGLInterface> gl(GrGLCreateANGLEInterface());
97 if (NULL == gl.get()) { 97 if (nullptr == gl.get()) {
98 SkDebugf("Could not create ANGLE GL interface!\n"); 98 SkDebugf("Could not create ANGLE GL interface!\n");
99 this->destroyGLContext(); 99 this->destroyGLContext();
100 return; 100 return;
101 } 101 }
102 if (!gl->validate()) { 102 if (!gl->validate()) {
103 SkDebugf("Could not validate ANGLE GL interface!\n"); 103 SkDebugf("Could not validate ANGLE GL interface!\n");
104 this->destroyGLContext(); 104 this->destroyGLContext();
105 return; 105 return;
106 } 106 }
107 107
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 void SkANGLEGLContext::onPlatformSwapBuffers() const { 141 void SkANGLEGLContext::onPlatformSwapBuffers() const {
142 if (!eglSwapBuffers(fDisplay, fSurface)) { 142 if (!eglSwapBuffers(fDisplay, fSurface)) {
143 SkDebugf("Could not complete eglSwapBuffers.\n"); 143 SkDebugf("Could not complete eglSwapBuffers.\n");
144 } 144 }
145 } 145 }
146 146
147 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const { 147 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const {
148 return eglGetProcAddress(name); 148 return eglGetProcAddress(name);
149 } 149 }
OLDNEW
« no previous file with comments | « src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698