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

Unified Diff: ui/gl/gl_glx_api_implementation.cc

Issue 15890002: Display GL window system binding information in about:gpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo in unit test. Created 7 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 | « ui/gl/gl_glx_api_implementation.h ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_glx_api_implementation.cc
diff --git a/ui/gl/gl_glx_api_implementation.cc b/ui/gl/gl_glx_api_implementation.cc
index f8e75a2cb08b1838bfcea8df0e7ca1c4b4ea134d..4a43534ec78370e21e9d9dd36ffcd17b057507ce 100644
--- a/ui/gl/gl_glx_api_implementation.cc
+++ b/ui/gl/gl_glx_api_implementation.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "ui/gl/gl_glx_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
namespace gfx {
@@ -64,6 +65,25 @@ void RealGLXApi::Initialize(DriverGLX* driver) {
TraceGLXApi::~TraceGLXApi() {
}
+bool GetGLWindowSystemBindingInfoGLX(GLWindowSystemBindingInfo* info) {
+ Display* display = glXGetCurrentDisplay();
+ const int kDefaultScreen = 0;
+ const char* vendor =
+ glXQueryServerString(display, kDefaultScreen, GLX_VENDOR);
+ const char* version =
+ glXQueryServerString(display, kDefaultScreen, GLX_VERSION);
+ const char* extensions =
+ glXQueryServerString(display, kDefaultScreen, GLX_EXTENSIONS);
+ *info = GLWindowSystemBindingInfo();
+ if (vendor)
+ info->vendor = vendor;
+ if (version)
+ info->version = version;
+ if (extensions)
+ info->extensions = extensions;
+ return true;
+}
+
} // namespace gfx
« no previous file with comments | « ui/gl/gl_glx_api_implementation.h ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698