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

Side by Side Diff: src/gpu/gl/GrGLInterface.cpp

Issue 254083002: Fail to create GrContext when we get a NULL for a GL/GLSL version string (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: check GrGLCaps::init return Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/GrGLSL.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 "gl/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLExtensions.h" 10 #include "gl/GrGLExtensions.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 NULL == fFunctions.fFramebufferTexture2D || 220 NULL == fFunctions.fFramebufferTexture2D ||
221 NULL == fFunctions.fGetFramebufferAttachmentParameteriv || 221 NULL == fFunctions.fGetFramebufferAttachmentParameteriv ||
222 NULL == fFunctions.fGetRenderbufferParameteriv || 222 NULL == fFunctions.fGetRenderbufferParameteriv ||
223 NULL == fFunctions.fGenFramebuffers || 223 NULL == fFunctions.fGenFramebuffers ||
224 NULL == fFunctions.fGenRenderbuffers || 224 NULL == fFunctions.fGenRenderbuffers ||
225 NULL == fFunctions.fRenderbufferStorage) { 225 NULL == fFunctions.fRenderbufferStorage) {
226 RETURN_FALSE_INTERFACE 226 RETURN_FALSE_INTERFACE
227 } 227 }
228 228
229 GrGLVersion glVer = GrGLGetVersion(this); 229 GrGLVersion glVer = GrGLGetVersion(this);
230 if (GR_GL_INVALID_VER == glVer) {
231 RETURN_FALSE_INTERFACE
232 }
230 233
231 // Now check that baseline ES/Desktop fns not covered above are present 234 // Now check that baseline ES/Desktop fns not covered above are present
232 // and that we have fn pointers for any advertised fExtensions that we will 235 // and that we have fn pointers for any advertised fExtensions that we will
233 // try to use. 236 // try to use.
234 237
235 // these functions are part of ES2, we assume they are available 238 // these functions are part of ES2, we assume they are available
236 // On the desktop we assume they are available if the extension 239 // On the desktop we assume they are available if the extension
237 // is present or GL version is high enough. 240 // is present or GL version is high enough.
238 if (kGLES_GrGLStandard == fStandard) { 241 if (kGLES_GrGLStandard == fStandard) {
239 if (NULL == fFunctions.fStencilFuncSeparate || 242 if (NULL == fFunctions.fStencilFuncSeparate ||
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 NULL == fFunctions.fMapTexSubImage2D || 503 NULL == fFunctions.fMapTexSubImage2D ||
501 NULL == fFunctions.fUnmapBufferSubData || 504 NULL == fFunctions.fUnmapBufferSubData ||
502 NULL == fFunctions.fUnmapTexSubImage2D) { 505 NULL == fFunctions.fUnmapTexSubImage2D) {
503 RETURN_FALSE_INTERFACE; 506 RETURN_FALSE_INTERFACE;
504 } 507 }
505 } 508 }
506 #endif 509 #endif
507 510
508 return true; 511 return true;
509 } 512 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/GrGLSL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698