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

Unified Diff: src/gpu/gl/GrGLExtensions.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, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLExtensions.cpp
diff --git a/src/gpu/gl/GrGLExtensions.cpp b/src/gpu/gl/GrGLExtensions.cpp
index 6d1b04d2cc6ced84e7f01420bf5f95f28302110e..53013df64da1e4974fb073f4e66d6016ff793e3f 100644
--- a/src/gpu/gl/GrGLExtensions.cpp
+++ b/src/gpu/gl/GrGLExtensions.cpp
@@ -54,10 +54,11 @@ bool GrGLExtensions::init(GrGLStandard standard,
// glGetStringi and indexed extensions were added in version 3.0 of desktop GL and ES.
const GrGLubyte* verString = getString(GR_GL_VERSION);
- if (NULL == verString) {
+ GrGLVersion version = GrGLGetVersionFromString((const char*) verString);
+ if (GR_GL_INVALID_VER == version) {
return false;
}
- GrGLVersion version = GrGLGetVersionFromString((const char*) verString);
+
bool indexed = version >= GR_GL_VER(3, 0);
if (indexed) {
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698