diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch')
-rw-r--r-- | external/poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch b/external/poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch new file mode 100644 index 00000000..cc7edf76 --- /dev/null +++ b/external/poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch @@ -0,0 +1,60 @@ +From 23a563155406980dfc8cf6f7c2da6cce0ac310f0 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Fri, 16 Oct 2015 16:35:16 +0300 +Subject: [PATCH 2/4] Do not try to initialize GL without libGL + +_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys +GLX api which will exit() if libGL.so.1 is not present. We do not +want that to happen and we don't want every app to have to set +"GDK_GL=disabled" environment variable: so use #ifdef set based on +opengl distro feature. + +Upstream is not interested in the fix as it is: Either epoxy should be +fixed (to not exit) or GTK+ possibly could do some additional probing +before calling epoxy APIs. + +Upstream-Status: Denied +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> + +--- + configure.ac | 6 ++++++ + gdk/x11/gdkvisual-x11.c | 5 +++++ + 2 files changed, 11 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 757fd7c..0a48875 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -351,6 +351,12 @@ AC_ARG_ENABLE(cloudproviders, + [AS_HELP_STRING([--enable-cloudproviders], + [enable libcloudproviders integration])], + [cloudproviders_set=yes]) ++AC_ARG_ENABLE(glx, ++ [AS_HELP_STRING([--enable-glx], ++ [When enabled Gdk will try to initialize GLX])]) ++AS_IF([test "x$enable_glx" != "xno"], [ ++ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime]) ++]) + + if test -z "$backend_set"; then + if test "$platform_win32" = yes; then +diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c +index 81479d8..3c8c5c0 100644 +--- a/gdk/x11/gdkvisual-x11.c ++++ b/gdk/x11/gdkvisual-x11.c +@@ -306,7 +306,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen) + /* If GL is available we want to pick better default/rgba visuals, + as we care about glx details such as alpha/depth/stencil depth, + stereo and double buffering */ ++ /* update_visuals_for_gl() will end up calling epoxy GLX api which ++ will exit if libgl is not there: so only do this if we know GL ++ is available */ ++#ifdef HAVE_GLX + _gdk_x11_screen_update_visuals_for_gl (screen); ++#endif + } + + gint +-- +2.14.1 + |