| Index: ui/gl/gl_context.cc
|
| diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
|
| index dc3a3e8c21e0323b0c68061c6b4a592f63eb3fd3..cd9a28c387dcfabd66c18b7ccf7bbd3b88c3ff44 100644
|
| --- a/ui/gl/gl_context.cc
|
| +++ b/ui/gl/gl_context.cc
|
| @@ -66,6 +66,13 @@ std::string GLContext::GetGLVersion() {
|
| return std::string(version ? version : "");
|
| }
|
|
|
| +std::string GLContext::GetGLRenderer() {
|
| + DCHECK(IsCurrent(NULL));
|
| + const char *renderer =
|
| + reinterpret_cast<const char*>(glGetString(GL_RENDERER));
|
| + return std::string(renderer ? renderer : "");
|
| +}
|
| +
|
| bool GLContext::HasExtension(const char* name) {
|
| std::string extensions = GetExtensions();
|
| extensions += " ";
|
| @@ -79,8 +86,9 @@ bool GLContext::HasExtension(const char* name) {
|
| const GLVersionInfo* GLContext::GetVersionInfo() {
|
| if(!version_info_) {
|
| std::string version = GetGLVersion();
|
| + std::string renderer = GetGLRenderer();
|
| version_info_ = scoped_ptr<GLVersionInfo>(
|
| - new GLVersionInfo(version.c_str()));
|
| + new GLVersionInfo(version.c_str(), renderer.c_str()));
|
| }
|
| return version_info_.get();
|
| }
|
|
|