Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: ui/gfx/gl/gl_surface_egl.cc

Issue 8890042: Share X connection between GLSurfaceGLX/EGL and MessagePumpX/GTK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix hang in unittests Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/compositor/test/test_compositor_host_linux.cc ('k') | ui/gfx/gl/gl_surface_glx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_surface_egl.cc
diff --git a/ui/gfx/gl/gl_surface_egl.cc b/ui/gfx/gl/gl_surface_egl.cc
index f1d075048a45d2c5f97cb92cea7d668af3fd2b78..001d63413ae38b31710d6890d97e37cc502dcf02 100644
--- a/ui/gfx/gl/gl_surface_egl.cc
+++ b/ui/gfx/gl/gl_surface_egl.cc
@@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop.h"
#if !defined(OS_ANDROID)
#include "third_party/angle/include/EGL/egl.h"
#include "third_party/angle/include/EGL/eglext.h"
@@ -56,7 +57,7 @@ bool GLSurfaceEGL::InitializeOneOff() {
#if defined(USE_WAYLAND)
g_native_display = ui::WaylandDisplay::Connect(NULL)->display();
#elif defined(USE_X11)
- g_native_display = XOpenDisplay(NULL);
+ g_native_display = base::MessagePumpForUI::GetDefaultXDisplay();
#else
g_native_display = EGL_DEFAULT_DISPLAY;
#endif
« no previous file with comments | « ui/gfx/compositor/test/test_compositor_host_linux.cc ('k') | ui/gfx/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698