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

Side by Side Diff: src/gpu/gl/GrGLUtil.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
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/gpu/gl/GrGLVertexArray.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLUtil.h" 9 #include "GrGLUtil.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool gLogCallsGL = !!(GR_GL_LOG_CALLS_START); 56 bool gLogCallsGL = !!(GR_GL_LOG_CALLS_START);
57 #endif 57 #endif
58 58
59 #if GR_GL_CHECK_ERROR 59 #if GR_GL_CHECK_ERROR
60 bool gCheckErrorGL = !!(GR_GL_CHECK_ERROR_START); 60 bool gCheckErrorGL = !!(GR_GL_CHECK_ERROR_START);
61 #endif 61 #endif
62 62
63 /////////////////////////////////////////////////////////////////////////////// 63 ///////////////////////////////////////////////////////////////////////////////
64 64
65 GrGLStandard GrGLGetStandardInUseFromString(const char* versionString) { 65 GrGLStandard GrGLGetStandardInUseFromString(const char* versionString) {
66 if (NULL == versionString) { 66 if (nullptr == versionString) {
67 SkDebugf("NULL GL version string."); 67 SkDebugf("nullptr GL version string.");
68 return kNone_GrGLStandard; 68 return kNone_GrGLStandard;
69 } 69 }
70 70
71 int major, minor; 71 int major, minor;
72 72
73 // check for desktop 73 // check for desktop
74 int n = sscanf(versionString, "%d.%d", &major, &minor); 74 int n = sscanf(versionString, "%d.%d", &major, &minor);
75 if (2 == n) { 75 if (2 == n) {
76 return kGL_GrGLStandard; 76 return kGL_GrGLStandard;
77 } 77 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 } 159 }
160 160
161 if (kIntel_GrGLVendor == vendor) { 161 if (kIntel_GrGLVendor == vendor) {
162 // We presume we're on the Intel driver since it hasn't identified itsel f as Mesa. 162 // We presume we're on the Intel driver since it hasn't identified itsel f as Mesa.
163 *outDriver = kIntel_GrGLDriver; 163 *outDriver = kIntel_GrGLDriver;
164 } 164 }
165 } 165 }
166 166
167 GrGLVersion GrGLGetVersionFromString(const char* versionString) { 167 GrGLVersion GrGLGetVersionFromString(const char* versionString) {
168 if (NULL == versionString) { 168 if (nullptr == versionString) {
169 SkDebugf("NULL GL version string."); 169 SkDebugf("nullptr GL version string.");
170 return GR_GL_INVALID_VER; 170 return GR_GL_INVALID_VER;
171 } 171 }
172 172
173 int major, minor; 173 int major, minor;
174 174
175 // check for mesa 175 // check for mesa
176 int mesaMajor, mesaMinor; 176 int mesaMajor, mesaMinor;
177 int n = sscanf(versionString, "%d.%d Mesa %d.%d", &major, &minor, &mesaMajor , &mesaMinor); 177 int n = sscanf(versionString, "%d.%d Mesa %d.%d", &major, &minor, &mesaMajor , &mesaMinor);
178 if (4 == n) { 178 if (4 == n) {
179 return GR_GL_VER(major, minor); 179 return GR_GL_VER(major, minor);
(...skipping 13 matching lines...) Expand all
193 193
194 n = sscanf(versionString, "OpenGL ES %d.%d", &major, &minor); 194 n = sscanf(versionString, "OpenGL ES %d.%d", &major, &minor);
195 if (2 == n) { 195 if (2 == n) {
196 return GR_GL_VER(major, minor); 196 return GR_GL_VER(major, minor);
197 } 197 }
198 198
199 return GR_GL_INVALID_VER; 199 return GR_GL_INVALID_VER;
200 } 200 }
201 201
202 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString) { 202 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString) {
203 if (NULL == versionString) { 203 if (nullptr == versionString) {
204 SkDebugf("NULL GLSL version string."); 204 SkDebugf("nullptr GLSL version string.");
205 return GR_GLSL_INVALID_VER; 205 return GR_GLSL_INVALID_VER;
206 } 206 }
207 207
208 int major, minor; 208 int major, minor;
209 209
210 int n = sscanf(versionString, "%d.%d", &major, &minor); 210 int n = sscanf(versionString, "%d.%d", &major, &minor);
211 if (2 == n) { 211 if (2 == n) {
212 return GR_GLSL_VER(major, minor); 212 return GR_GLSL_VER(major, minor);
213 } 213 }
214 214
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 GR_STATIC_ASSERT(2 == kGreater_StencilFunc); 366 GR_STATIC_ASSERT(2 == kGreater_StencilFunc);
367 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc); 367 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc);
368 GR_STATIC_ASSERT(4 == kLess_StencilFunc); 368 GR_STATIC_ASSERT(4 == kLess_StencilFunc);
369 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc); 369 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc);
370 GR_STATIC_ASSERT(6 == kEqual_StencilFunc); 370 GR_STATIC_ASSERT(6 == kEqual_StencilFunc);
371 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc); 371 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc);
372 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount); 372 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount);
373 373
374 return gTable[basicFunc]; 374 return gTable[basicFunc];
375 } 375 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/gpu/gl/GrGLVertexArray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698