Index: ui/gl/gl_context.cc |
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc |
index 0f3b3561390189453f9c746bfb31a7a43f564546..80622b2f6e19c17aa63d1be2ccf4aa30a36db60a 100644 |
--- a/ui/gl/gl_context.cc |
+++ b/ui/gl/gl_context.cc |
@@ -61,6 +61,7 @@ GLContext::~GLContext() { |
GLApi* GLContext::CreateGLApi(DriverGL* driver) { |
real_gl_api_ = new RealGLApi; |
real_gl_api_->Initialize(driver); |
+ real_gl_api_->set_gl_workarounds(gl_workarounds_); |
return real_gl_api_; |
} |
@@ -210,6 +211,14 @@ void GLContext::SetCurrent(GLSurface* surface) { |
} |
} |
+void GLContext::SetGLWorkarounds(const GLWorkarounds& workarounds) { |
+ DCHECK(IsCurrent(nullptr)); |
+ gl_workarounds_ = workarounds; |
+ if (real_gl_api_) { |
+ real_gl_api_->set_gl_workarounds(gl_workarounds_); |
+ } |
+} |
+ |
GLStateRestorer* GLContext::GetGLStateRestorer() { |
return state_restorer_.get(); |
} |