Index: content/common/gpu/media/rendering_helper.cc |
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc |
index c18cffc5b9fb8b424a5f0049510d5af586328573..d586c8c89199e84c334e108d8fbe75440309b06f 100644 |
--- a/content/common/gpu/media/rendering_helper.cc |
+++ b/content/common/gpu/media/rendering_helper.cc |
@@ -54,12 +54,16 @@ class GLContextStubWithExtensions : public gfx::GLContextStub { |
virtual std::string GetExtensions() OVERRIDE; |
void AddExtensionsString(const char* extensions); |
+ void SetGLVersionString(const char* version_str); |
protected: |
+ virtual std::string GetGLVersion() OVERRIDE; |
+ |
virtual ~GLContextStubWithExtensions() {} |
private: |
std::string extensions_; |
+ std::string version_str_; |
DISALLOW_COPY_AND_ASSIGN(GLContextStubWithExtensions); |
}; |
@@ -77,6 +81,14 @@ std::string GLContextStubWithExtensions::GetExtensions() { |
return extensions_; |
} |
+void GLContextStubWithExtensions::SetGLVersionString(const char* version_str) { |
+ version_str_ = std::string(version_str ? version_str : ""); |
+} |
+ |
+std::string GLContextStubWithExtensions::GetGLVersion() { |
+ return version_str_; |
+} |
+ |
} // anonymous |
namespace content { |
@@ -135,7 +147,7 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params, |
done.Wait(); |
} |
- gfx::InitializeGLBindings(kGLImplementation); |
+ gfx::InitializeStaticGLBindings(kGLImplementation); |
scoped_refptr<GLContextStubWithExtensions> stub_context( |
new GLContextStubWithExtensions()); |
@@ -171,6 +183,8 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params, |
CHECK(gl_context_); |
stub_context->AddExtensionsString( |
reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); |
+ stub_context->SetGLVersionString( |
+ reinterpret_cast<const char*>(glGetString(GL_VERSION))); |
#else // EGL |
EGLNativeDisplayType native_display; |
@@ -208,6 +222,8 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params, |
reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); |
stub_context->AddExtensionsString( |
eglQueryString(gl_display_, EGL_EXTENSIONS)); |
+ stub_context->SetGLVersionString( |
+ reinterpret_cast<const char*>(glGetString(GL_VERSION))); |
#endif |
// Per-window/surface X11 & EGL initialization. |
@@ -263,7 +279,7 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params, |
} |
// Must be done after a context is made current. |
- gfx::InitializeGLExtensionBindings(kGLImplementation, stub_context.get()); |
+ gfx::InitializeDynamicGLBindings(kGLImplementation, stub_context.get()); |
if (render_as_thumbnails_) { |
CHECK_EQ(window_dimensions_.size(), 1U); |