Index: ui/gl/gl_implementation_win.cc |
diff --git a/ui/gl/gl_implementation_win.cc b/ui/gl/gl_implementation_win.cc |
index f0c562648bccbce37f5e111b785b669d67597423..d4b81a9c93dcff5bce70cf95dd6abc17269d210a 100644 |
--- a/ui/gl/gl_implementation_win.cc |
+++ b/ui/gl/gl_implementation_win.cc |
@@ -274,4 +274,34 @@ void ClearGLBindings() { |
UnloadGLNativeLibraries(); |
} |
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { |
+ *info = GLWindowSystemBindingInfo(); |
+ switch (GetGLImplementation()) { |
+ case kGLImplementationDesktopGL: { |
+ if (!wglGetExtensionsStringEXT) |
+ return false; |
+ const char* extensions = wglGetExtensionsStringEXT(); |
+ if (extensions) |
+ info->extensions = extensions; |
+ return true; |
+ } |
+ case kGLImplementationEGLGLES2: { |
+ EGLDisplay display = eglGetCurrentDisplay(); |
+ const char* vendor = eglQueryString(display, EGL_VENDOR); |
+ const char* version = eglQueryString(display, EGL_VERSION); |
+ const char* extensions = eglQueryString(display, EGL_EXTENSIONS); |
+ if (vendor) |
+ info->vendor = vendor; |
+ if (version) |
+ info->version = version; |
+ if (extensions) |
+ info->extensions = extensions; |
+ return true; |
+ } |
+ default: |
+ return false; |
+ } |
+ return false; |
+} |
+ |
} // namespace gfx |