Index: ui/gl/gl_context.h |
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h |
index 0d1aa6d0f40492d74e3f056cc3ffbd53e4a2ef74..9076c0a5306ca8721d7d4c799e88335be6981aea 100644 |
--- a/ui/gl/gl_context.h |
+++ b/ui/gl/gl_context.h |
@@ -68,11 +68,22 @@ struct GLContextAttribs { |
ContextPriority context_priority = ContextPriorityMedium; |
}; |
+struct GLWorkarounds { |
+ // glClearColor does not always work on Intel 6xxx Mac drivers. See |
+ // crbug.com/710443. |
+ bool clear_to_zero_or_one_broken = false; |
+}; |
+ |
// Encapsulates an OpenGL context, hiding platform specific management. |
class GL_EXPORT GLContext : public base::RefCounted<GLContext> { |
public: |
explicit GLContext(GLShareGroup* share_group); |
+ // Set the GL workarounds. |
+ static void SetGLWorkarounds(const GLWorkarounds& workarounds); |
+ // Get the GL workarounds. |
+ static GLWorkarounds GetGLWorkarounds(); |
+ |
// Initializes the GL context to be compatible with the given surface. The GL |
// context can be made with other surface's of the same type. The compatible |
// surface is only needed for certain platforms like WGL, OSMesa and GLX. It |
@@ -222,6 +233,8 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> { |
std::unique_ptr<GLVersionInfo> GenerateGLVersionInfo(); |
+ static GLWorkarounds gl_workarounds_; |
Zhenyao Mo
2017/06/21 16:52:05
Again, sorry for not being clear. I think this ne
jiajia.qin
2017/06/22 11:18:58
OK. I have modified it to a non-static member. But
|
+ |
bool static_bindings_initialized_ = false; |
bool dynamic_bindings_initialized_ = false; |
std::unique_ptr<DriverGL> driver_gl_; |