[gtk/wip/otte/gleanup: 24/70] glx: Don't initialize GLX multiple times.
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gleanup: 24/70] glx: Don't initialize GLX multiple times.
- Date: Mon, 19 Jul 2021 02:52:49 +0000 (UTC)
commit 85ca2efe6ecbc45603e683752bd0b2002957215b
Author: Benjamin Otte <otte redhat com>
Date: Sun Jun 6 17:14:31 2021 +0200
glx: Don't initialize GLX multiple times.
Either it is initialized or it isn't.
gdk/x11/gdkglcontext-egl.c | 5 +----
gdk/x11/gdkglcontext-glx.c | 7 ++-----
2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gdk/x11/gdkglcontext-egl.c b/gdk/x11/gdkglcontext-egl.c
index b278b9d36c..c59812bc1f 100644
--- a/gdk/x11/gdkglcontext-egl.c
+++ b/gdk/x11/gdkglcontext-egl.c
@@ -805,10 +805,7 @@ gdk_x11_display_get_egl_version (GdkDisplay *display,
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
- if (display_x11->have_glx)
- return FALSE;
-
- if (!gdk_x11_screen_init_egl (display_x11->screen))
+ if (!display_x11->have_egl)
return FALSE;
if (major != NULL)
diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c
index f18b63f814..a6306c6ed1 100644
--- a/gdk/x11/gdkglcontext-glx.c
+++ b/gdk/x11/gdkglcontext-glx.c
@@ -1019,7 +1019,7 @@ gdk_x11_screen_update_visuals_for_glx (GdkX11Screen *x11_screen)
display_x11 = GDK_X11_DISPLAY (display);
dpy = gdk_x11_display_get_xdisplay (display);
- if (display_x11->have_egl)
+ if (!display_x11->have_glx)
return;
/* We save the default visuals as a property on the root window to avoid
@@ -1040,9 +1040,6 @@ gdk_x11_screen_update_visuals_for_glx (GdkX11Screen *x11_screen)
}
}
- if (!gdk_x11_screen_init_glx (x11_screen))
- return;
-
gl_info = g_new0 (struct glvisualinfo, x11_screen->nvisuals);
for (i = 0; i < x11_screen->nvisuals; i++)
@@ -1194,7 +1191,7 @@ gdk_x11_display_get_glx_version (GdkDisplay *display,
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
- if (!gdk_x11_screen_init_glx (display_x11->screen))
+ if (!display_x11->have_glx)
return FALSE;
if (major != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]