Index: ui/gl/gl_gl_api_implementation.cc |
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc |
index ecd5881e5c607a067e910a0ac23979c9be967a76..8a12fc6ab982d2aee78e4ec3c06d36436e962a8a 100644 |
--- a/ui/gl/gl_gl_api_implementation.cc |
+++ b/ui/gl/gl_gl_api_implementation.cc |
@@ -423,6 +423,21 @@ void RealGLApi::glClearFn(GLbitfield mask) { |
GLApiBase::glClearFn(mask); |
} |
+void RealGLApi::glClearColorFn(GLclampf red, |
+ GLclampf green, |
+ GLclampf blue, |
+ GLclampf alpha) { |
+ if (GLContext::GetGLWorkarounds().clear_to_zero_or_one_broken && |
+ (1 == red || 0 == red) && (1 == green || 0 == green) && |
+ (1 == blue || 0 == blue) && (1 == alpha || 0 == alpha)) { |
+ if (1 == alpha) |
+ alpha = 2; |
+ else |
+ alpha = -1; |
+ } |
+ GLApiBase::glClearColorFn(red, green, blue, alpha); |
+} |
+ |
void RealGLApi::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) { |
if (!g_null_draw_bindings_enabled) |
GLApiBase::glDrawArraysFn(mode, first, count); |