diff options
Diffstat (limited to 'gfx/gl/GLContextProviderGLX.cpp')
-rw-r--r-- | gfx/gl/GLContextProviderGLX.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp index d804f95af..539520a8c 100644 --- a/gfx/gl/GLContextProviderGLX.cpp +++ b/gfx/gl/GLContextProviderGLX.cpp @@ -80,7 +80,6 @@ GLXLibrary::EnsureInitialized() if (!mOGLLibrary) { const char* libGLfilename = nullptr; - bool forceFeatureReport = false; // see e.g. bug 608526: it is intrinsically interesting to know whether we have dynamically linked to libGL.so.1 // because at least the NVIDIA implementation requires an executable stack, which causes mprotect calls, @@ -994,6 +993,27 @@ GLContextGLX::SwapBuffers() return true; } +void +GLContextGLX::GetWSIInfo(nsCString* const out) const +{ + Display* display = DefaultXDisplay(); + int screen = DefaultScreen(display); + + int majorVersion, minorVersion; + sGLXLibrary.xQueryVersion(display, &majorVersion, &minorVersion); + + out->Append(nsPrintfCString("GLX %u.%u", majorVersion, minorVersion)); + + out->AppendLiteral("\nGLX_VENDOR(client): "); + out->Append(sGLXLibrary.xGetClientString(display, LOCAL_GLX_VENDOR)); + + out->AppendLiteral("\nGLX_VENDOR(server): "); + out->Append(sGLXLibrary.xQueryServerString(display, screen, LOCAL_GLX_VENDOR)); + + out->AppendLiteral("\nExtensions: "); + out->Append(sGLXLibrary.xQueryExtensionsString(display, screen)); +} + bool GLContextGLX::OverrideDrawable(GLXDrawable drawable) { |