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

Unified Diff: src/gpu/gl/GrGLUtil.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/GrGLUtil.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUtil.cpp
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index a479523b65b839aaf119d3d2608c3b175a92e870..ddfcfbf0a6de362d31c66a2918f1b0382650ff5d 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -140,7 +140,7 @@ bool GrGLIsChromiumFromRendererString(const char* rendererString) {
GrGLVersion GrGLGetVersionFromString(const char* versionString) {
if (NULL == versionString) {
SkDEBUGFAIL("NULL GL version string.");
- return 0;
+ return GR_GL_INVALID_VER;
}
int major, minor;
@@ -152,7 +152,7 @@ GrGLVersion GrGLGetVersionFromString(const char* versionString) {
if (get_gl_version_for_mesa(mesaMajor, &major, &minor)) {
return GR_GL_VER(major, minor);
} else {
- return 0;
+ return GR_GL_INVALID_VER;
}
}
@@ -173,13 +173,13 @@ GrGLVersion GrGLGetVersionFromString(const char* versionString) {
return GR_GL_VER(major, minor);
}
- return 0;
+ return GR_GL_INVALID_VER;
}
GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString) {
if (NULL == versionString) {
SkDEBUGFAIL("NULL GLSL version string.");
- return 0;
+ return GR_GLSL_INVALID_VER;
}
int major, minor;
@@ -202,7 +202,7 @@ GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString) {
}
#endif
- return 0;
+ return GR_GLSL_INVALID_VER;
}
GrGLVendor GrGLGetVendorFromString(const char* vendorString) {
« no previous file with comments | « src/gpu/gl/GrGLUtil.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698