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

Unified Diff: app/gfx/gl/gl_context_linux.cc

Issue 2382002: Added warning if GLX version is less than 1.3. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/gl/gl_context_linux.cc
===================================================================
--- app/gfx/gl/gl_context_linux.cc (revision 48331)
+++ app/gfx/gl/gl_context_linux.cc (working copy)
@@ -9,11 +9,13 @@
#include <GL/glxew.h>
#include <GL/glx.h>
#include <GL/osmew.h>
+#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "app/x11_util.h"
#include "base/logging.h"
+#include "base/process_util.h"
#include "base/scoped_ptr.h"
#include "app/gfx/gl/gl_context.h"
#include "app/gfx/gl/gl_context_osmesa.h"
@@ -149,6 +151,16 @@
LOG(ERROR) << "glxewContextInit failed";
return false;
}
+
+ int major, minor;
+ if (!glXQueryVersion(display, &major, &minor)) {
+ LOG(ERROR) << "glxQueryVersion failed";
+ return false;
+ }
+
+ if (major == 1 && minor < 3) {
+ LOG(WARNING) << "GLX 1.3 or later is recommended.";
+ }
}
initialized = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698