Index: ui/gl/gl_surface_x11.cc |
diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc |
index 74ad999e2b2f5b1e8997e4e8537df79f1e989938..113792fb33a583596416876c8802eb071f828412 100644 |
--- a/ui/gl/gl_surface_x11.cc |
+++ b/ui/gl/gl_surface_x11.cc |
@@ -19,6 +19,14 @@ |
namespace gfx { |
+namespace { |
+ |
+EGLNativeDisplayType GetEGLDisplay() { |
+ return base::MessagePumpForUI::GetDefaultXDisplay(); |
+} |
+ |
+} // namesapce |
+ |
// This OSMesa GL surface can use XLib to swap the contents of the buffer to a |
// view. |
class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { |
@@ -64,7 +72,7 @@ bool GLSurface::InitializeOneOffInternal() { |
} |
break; |
case kGLImplementationEGLGLES2: |
- if (!GLSurfaceEGL::InitializeOneOff()) { |
+ if (!GLSurfaceEGL::InitializeOneOff(GetEGLDisplay())) { |
LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; |
return false; |
} |