Bug 1663003 [Linux/EGL] Use GLX to find X Visual for EGL as a workaround for https://gitlab.freedesktop.org/mesa/mesa/-/issues/149, r=jgilbert

Differential Revision: https://phabricator.services.mozilla.com/D89721
This commit is contained in:
stransky
2020-09-11 10:40:09 +00:00
parent a4ec0af11d
commit 6f8830f945

View File

@@ -4346,7 +4346,11 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
int visualId = 0;
bool haveVisual;
if (!gfx::gfxVars::UseEGL()) {
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1663003
// We need to use GLX to get visual even on EGL until
// EGL can provide compositable visual:
// https://gitlab.freedesktop.org/mesa/mesa/-/issues/149
if ((true /* !gfx::gfxVars::UseEGL() */)) {
auto display = GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(mShell));
int screenNumber = GDK_SCREEN_XNUMBER(screen);
haveVisual = GLContextGLX::FindVisual(