Index: ui/gl/gl_surface.cc |
diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc |
index e9c7ce915a3ce13d6f7911fe87ed1f1a35f955ff..cd3d66ed11ec4b45366778e135d7f242376e919f 100644 |
--- a/ui/gl/gl_surface.cc |
+++ b/ui/gl/gl_surface.cc |
@@ -16,6 +16,10 @@ |
#include "ui/gl/gl_implementation.h" |
#include "ui/gl/gl_switches.h" |
+#if defined(USE_X11) |
+#include <X11/Xlib.h> |
+#endif |
+ |
namespace gfx { |
namespace { |
@@ -92,6 +96,10 @@ bool GLSurface::InitializeOneOffImplementation(GLImplementation impl, |
// static |
void GLSurface::InitializeOneOffForTests() { |
+#if defined(USE_X11) |
+ XInitThreads(); |
+#endif |
+ |
bool use_osmesa = true; |
#if defined(OS_ANDROID) |
@@ -112,9 +120,8 @@ void GLSurface::InitializeOneOffForTests() { |
bool fallback_to_osmesa = false; |
bool gpu_service_logging = false; |
- bool disable_gl_drawing = false; |
- // TODO(danakj): Unit tests do not produce pixel output by default. |
- // bool disable_gl_drawing = true; |
+ // Unit tests do not produce pixel output by default. |
+ bool disable_gl_drawing = true; |
CHECK(InitializeOneOffImplementation( |
impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing)); |