| Index: ui/gfx/gl/gl_context.cc
|
| diff --git a/ui/gfx/gl/gl_context.cc b/ui/gfx/gl/gl_context.cc
|
| index 998614fbc96e40e758a35ebc08a168355765b780..9fc541127b5944fd2ebb2e696c1fbff0cefc9483 100644
|
| --- a/ui/gfx/gl/gl_context.cc
|
| +++ b/ui/gfx/gl/gl_context.cc
|
| @@ -39,8 +39,20 @@ GLContext::~GLContext() {
|
|
|
| std::string GLContext::GetExtensions() {
|
| DCHECK(IsCurrent(NULL));
|
| - const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
|
| - return std::string(ext ? ext : "");
|
| +
|
| + std::string extensions;
|
| + if (GLSurface::GetCurrent()) {
|
| + extensions = GLSurface::GetCurrent()->GetExtensions();
|
| + }
|
| +
|
| + const char* gl_ext = reinterpret_cast<const char*>(
|
| + glGetString(GL_EXTENSIONS));
|
| + if (gl_ext) {
|
| + extensions += (!extensions.empty() && gl_ext[0]) ? " " : "";
|
| + extensions += gl_ext;
|
| + }
|
| +
|
| + return extensions;
|
| }
|
|
|
| bool GLContext::HasExtension(const char* name) {
|
|
|