[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/8] gtk: remove CONFIG_GTK_GL
From: |
Paolo Bonzini |
Subject: |
[PATCH 3/8] gtk: remove CONFIG_GTK_GL |
Date: |
Thu, 7 Jan 2021 15:00:34 +0100 |
CONFIG_GTK_GL is defined if OpenGL is present and GTK+
is 3.16 or newer. Since GTK+ 3.22 is the minimum supported
version, just use CONFIG_OPENGL instead.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 7 -------
meson.build | 1 -
ui/gtk.c | 16 ++++++++--------
ui/meson.build | 3 +--
4 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/configure b/configure
index 2dd772a60c..c6d09b225e 100755
--- a/configure
+++ b/configure
@@ -415,7 +415,6 @@ cfi_debug="false"
seccomp="auto"
glusterfs="auto"
gtk="$default_feature"
-gtk_gl="no"
tls_priority="NORMAL"
gnutls="$default_feature"
nettle="$default_feature"
@@ -3626,9 +3625,6 @@ if test "$opengl" != "no" ; then
opengl_cflags="$($pkg_config --cflags $opengl_pkgs)"
opengl_libs="$($pkg_config --libs $opengl_pkgs)"
opengl=yes
- if test "$gtk" = "yes" && $pkg_config --exists "$gtkpackage >= 3.16"; then
- gtk_gl="yes"
- fi
else
if test "$opengl" = "yes" ; then
feature_not_found "opengl" "Please install opengl (mesa) devel pkgs:
$opengl_pkgs"
@@ -5781,9 +5777,6 @@ if test "$gtk" = "yes" ; then
echo "CONFIG_GTK=y" >> $config_host_mak
echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
echo "GTK_LIBS=$gtk_libs" >> $config_host_mak
- if test "$gtk_gl" = "yes" ; then
- echo "CONFIG_GTK_GL=y" >> $config_host_mak
- fi
fi
if test "$gio" = "yes" ; then
echo "CONFIG_GIO=y" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 36f1d02190..a729a30d2f 100644
--- a/meson.build
+++ b/meson.build
@@ -2337,7 +2337,6 @@ summary_info += {'SDL support': sdl.found()}
summary_info += {'SDL image support': sdl_image.found()}
# TODO: add back version
summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')}
-summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')}
summary_info += {'pixman': pixman.found()}
# TODO: add back version
summary_info += {'VTE support': config_host.has_key('CONFIG_VTE')}
diff --git a/ui/gtk.c b/ui/gtk.c
index a752aa22be..e8474456df 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -396,7 +396,7 @@ static void gd_update_full_redraw(VirtualConsole *vc)
int ww, wh;
ww = gdk_window_get_width(gtk_widget_get_window(area));
wh = gdk_window_get_height(gtk_widget_get_window(area));
-#if defined(CONFIG_GTK_GL)
+#if defined(CONFIG_OPENGL)
if (vc->gfx.gls && gtk_use_gl_area) {
gtk_gl_area_queue_render(GTK_GL_AREA(vc->gfx.drawing_area));
return;
@@ -625,7 +625,7 @@ static const DisplayChangeListenerOps dcl_ops = {
/** DisplayState Callbacks (opengl version) **/
-#if defined(CONFIG_GTK_GL)
+#if defined(CONFIG_OPENGL)
static const DisplayChangeListenerOps dcl_gl_area_ops = {
.dpy_name = "gtk-egl",
@@ -644,7 +644,7 @@ static const DisplayChangeListenerOps dcl_gl_area_ops = {
.dpy_gl_update = gd_gl_area_scanout_flush,
};
-#endif /* CONFIG_GTK_GL */
+#endif /* CONFIG_OPENGL */
static const DisplayChangeListenerOps dcl_egl_ops = {
.dpy_name = "gtk-egl",
@@ -725,7 +725,7 @@ static void gd_set_ui_info(VirtualConsole *vc, gint width,
gint height)
dpy_set_ui_info(vc->gfx.dcl.con, &info);
}
-#if defined(CONFIG_GTK_GL)
+#if defined(CONFIG_OPENGL)
static gboolean gd_render_event(GtkGLArea *area, GdkGLContext *context,
void *opaque)
@@ -1865,7 +1865,7 @@ static void gd_connect_vc_gfx_signals(VirtualConsole *vc)
{
g_signal_connect(vc->gfx.drawing_area, "draw",
G_CALLBACK(gd_draw_event), vc);
-#if defined(CONFIG_GTK_GL)
+#if defined(CONFIG_OPENGL)
if (gtk_use_gl_area) {
/* wire up GtkGlArea events */
g_signal_connect(vc->gfx.drawing_area, "render",
@@ -1992,12 +1992,12 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s,
VirtualConsole *vc,
#if defined(CONFIG_OPENGL)
if (display_opengl) {
-#if defined(CONFIG_GTK_GL)
+#if defined(CONFIG_OPENGL)
if (gtk_use_gl_area) {
vc->gfx.drawing_area = gtk_gl_area_new();
vc->gfx.dcl.ops = &dcl_gl_area_ops;
} else
-#endif /* CONFIG_GTK_GL */
+#endif /* CONFIG_OPENGL */
{
vc->gfx.drawing_area = gtk_drawing_area_new();
/*
@@ -2314,7 +2314,7 @@ static void early_gtk_display_init(DisplayOptions *opts)
assert(opts->type == DISPLAY_TYPE_GTK);
if (opts->has_gl && opts->gl != DISPLAYGL_MODE_OFF) {
#if defined(CONFIG_OPENGL)
-#if defined(CONFIG_GTK_GL) && defined(GDK_WINDOWING_WAYLAND)
+#if defined(GDK_WINDOWING_WAYLAND)
if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) {
gtk_use_gl_area = true;
gtk_gl_area_init();
diff --git a/ui/meson.build b/ui/meson.build
index 013258a01c..d805448c4e 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -63,8 +63,7 @@ if config_host.has_key('CONFIG_GTK')
gtk_ss = ss.source_set()
gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
gtk_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c'))
- gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
- gtk_ss.add(when: [opengl, 'CONFIG_GTK_GL'], if_true: files('gtk-gl-area.c'))
+ gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c',
'gtk-gl-area.c'))
ui_modules += {'gtk' : gtk_ss}
endif
--
2.29.2
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, (continued)
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, Helge Deller, 2021/01/13
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, Paolo Bonzini, 2021/01/13
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, Helge Deller, 2021/01/13
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, John Paul Adrian Glaubitz, 2021/01/14
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, John David Anglin, 2021/01/13
- Re: [PATCH 1/8] build-system: clean up TCG/TCI configury, John Paul Adrian Glaubitz, 2021/01/13
[PATCH 3/8] gtk: remove CONFIG_GTK_GL,
Paolo Bonzini <=
[PATCH 2/8] cocoa: do not enable coreaudio automatically, Paolo Bonzini, 2021/01/07
[PATCH 5/8] configure: move GTK+ detection to Meson, Paolo Bonzini, 2021/01/07
[PATCH 4/8] configure: move X11 detection to Meson, Paolo Bonzini, 2021/01/07
[PATCH 8/8] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/01/07