From 13b635f16cf84fa62ea6f2e57ef29b692cd8b1b5 Mon Sep 17 00:00:00 2001 From: William Wold Date: Mon, 12 Oct 2020 20:54:47 -0700 Subject: [PATCH] Use X11 display to create EGL display --- shell/platform/linux/fl_renderer_x11.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/shell/platform/linux/fl_renderer_x11.cc b/shell/platform/linux/fl_renderer_x11.cc index 2c646b16ca223..00c8726aea8b2 100644 --- a/shell/platform/linux/fl_renderer_x11.cc +++ b/shell/platform/linux/fl_renderer_x11.cc @@ -50,11 +50,7 @@ static gboolean fl_renderer_x11_setup_window_attr( // Implements FlRenderer::create_display. static EGLDisplay fl_renderer_x11_create_display(FlRenderer* renderer) { - // Note the use of EGL_DEFAULT_DISPLAY rather than sharing the existing - // display connection from GTK. This is because this EGL display is going to - // be accessed by a thread from Flutter. The GTK/X11 display connection is not - // thread safe and would cause a crash. - return eglGetDisplay(EGL_DEFAULT_DISPLAY); + return eglGetDisplay(gdk_x11_get_default_xdisplay()); } // Implements FlRenderer::create_surfaces.