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

Unified Diff: src/gpu/gl/GrGLContext.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/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLExtensions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLContext.cpp
diff --git a/src/gpu/gl/GrGLContext.cpp b/src/gpu/gl/GrGLContext.cpp
index 54deb323c0a60ff6a40dc7407a5bda900f2e5220..5bc5b6f0312bd65b1e7fd6cf251f167595492c1e 100644
--- a/src/gpu/gl/GrGLContext.cpp
+++ b/src/gpu/gl/GrGLContext.cpp
@@ -37,8 +37,13 @@ bool GrGLContextInfo::initialize(const GrGLInterface* interface) {
if (interface->validate()) {
fGLVersion = GrGLGetVersionFromString(ver);
+ if (GR_GL_INVALID_VER == fGLVersion) {
+ return false;
+ }
- fGLSLGeneration = GrGetGLSLGeneration(interface);
+ if (!GrGetGLSLGeneration(interface, &fGLSLGeneration)) {
+ return false;
+ }
fVendor = GrGLGetVendor(interface);
@@ -51,9 +56,7 @@ bool GrGLContextInfo::initialize(const GrGLInterface* interface) {
// This must occur before caps init.
fInterface.reset(SkRef(interface));
- fGLCaps->init(*this, interface);
-
- return true;
+ return fGLCaps->init(*this, interface);
}
}
return false;
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698