From bd94adaf74563cbf6614ac59ad936cd7f9bd5c7b Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 3 May 2022 12:53:45 +0200 Subject: [PATCH] cogl: Unify HAS_X11/HAS_XLIB build configs Part-of: --- cogl/cogl/cogl-defines.h.meson | 2 -- cogl/cogl/cogl-mutter.h | 2 +- cogl/cogl/cogl-renderer-private.h | 2 +- cogl/cogl/cogl-renderer.c | 8 ++++---- cogl/cogl/deprecated/cogl-clutter.c | 2 +- cogl/cogl/meson.build | 2 -- cogl/cogl/winsys/cogl-winsys-private.h | 6 +++--- 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/cogl/cogl/cogl-defines.h.meson b/cogl/cogl/cogl-defines.h.meson index 911b0abdd..0e80f1282 100644 --- a/cogl/cogl/cogl-defines.h.meson +++ b/cogl/cogl/cogl-defines.h.meson @@ -42,8 +42,6 @@ #mesondefine COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT #mesondefine COGL_HAS_EGL_SUPPORT #mesondefine COGL_HAS_X11 -#mesondefine COGL_HAS_X11_SUPPORT #mesondefine COGL_HAS_XLIB -#mesondefine COGL_HAS_XLIB_SUPPORT #mesondefine COGL_HAS_TRACING diff --git a/cogl/cogl/cogl-mutter.h b/cogl/cogl/cogl-mutter.h index a8bf45919..d6e55a1b1 100644 --- a/cogl/cogl/cogl-mutter.h +++ b/cogl/cogl/cogl-mutter.h @@ -45,7 +45,7 @@ #if defined (COGL_HAS_GLX_SUPPORT) #include #endif -#if defined (COGL_HAS_XLIB_SUPPORT) +#if defined (COGL_HAS_XLIB) #include #endif #ifdef COGL_HAS_X11 diff --git a/cogl/cogl/cogl-renderer-private.h b/cogl/cogl/cogl-renderer-private.h index 66634c075..b37a5aa7c 100644 --- a/cogl/cogl/cogl-renderer-private.h +++ b/cogl/cogl/cogl-renderer-private.h @@ -63,7 +63,7 @@ struct _CoglRenderer GList *outputs; -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB Display *foreign_xdpy; gboolean xlib_enable_event_retrieval; gboolean xlib_want_reset_on_video_memory_purge; diff --git a/cogl/cogl/cogl-renderer.c b/cogl/cogl/cogl-renderer.c index 38f7a36d7..ccf3b766e 100644 --- a/cogl/cogl/cogl-renderer.c +++ b/cogl/cogl/cogl-renderer.c @@ -55,7 +55,7 @@ #include "winsys/cogl-winsys-glx-private.h" #endif -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB #include "cogl-xlib-renderer.h" #endif @@ -202,14 +202,14 @@ cogl_renderer_new (void) _cogl_list_init (&renderer->idle_closures); -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB renderer->xlib_enable_event_retrieval = TRUE; #endif return _cogl_renderer_object_new (renderer); } -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB void cogl_xlib_renderer_set_foreign_display (CoglRenderer *renderer, Display *xdisplay) @@ -243,7 +243,7 @@ cogl_xlib_renderer_request_reset_on_video_memory_purge (CoglRenderer *renderer, renderer->xlib_want_reset_on_video_memory_purge = enable; } -#endif /* COGL_HAS_XLIB_SUPPORT */ +#endif /* COGL_HAS_XLIB */ gboolean cogl_renderer_check_onscreen_template (CoglRenderer *renderer, diff --git a/cogl/cogl/deprecated/cogl-clutter.c b/cogl/cogl/deprecated/cogl-clutter.c index a2528c8be..9bbdf1717 100644 --- a/cogl/cogl/deprecated/cogl-clutter.c +++ b/cogl/cogl/deprecated/cogl-clutter.c @@ -40,7 +40,7 @@ #include "cogl-context-private.h" #include "cogl-framebuffer-private.h" #include "cogl-onscreen-private.h" -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB #include "cogl-xlib-renderer.h" #endif #include "winsys/cogl-winsys-private.h" diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build index d5da0151e..fa34eac52 100644 --- a/cogl/cogl/meson.build +++ b/cogl/cogl/meson.build @@ -8,9 +8,7 @@ cdata.set('COGL_HAS_GLX_SUPPORT', have_glx) cdata.set('COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT', have_egl_xlib) cdata.set('COGL_HAS_EGL_SUPPORT', have_egl) cdata.set('COGL_HAS_X11', have_x11) -cdata.set('COGL_HAS_X11_SUPPORT', have_x11) cdata.set('COGL_HAS_XLIB', have_x11_client) -cdata.set('COGL_HAS_XLIB_SUPPORT', have_x11_client) cdata.set('COGL_HAS_TRACING', have_profiler) cogl_defines_h = configure_file( diff --git a/cogl/cogl/winsys/cogl-winsys-private.h b/cogl/cogl/winsys/cogl-winsys-private.h index 45aec7ea6..98b5793f2 100644 --- a/cogl/cogl/winsys/cogl-winsys-private.h +++ b/cogl/cogl/winsys/cogl-winsys-private.h @@ -34,11 +34,11 @@ #include "cogl-renderer.h" #include "cogl-scanout.h" -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB #include "cogl-texture-pixmap-x11-private.h" #endif -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB #include #include "cogl-texture-pixmap-x11-private.h" #endif @@ -114,7 +114,7 @@ typedef struct _CoglWinsysVtable /* Optional functions */ -#ifdef COGL_HAS_XLIB_SUPPORT +#ifdef COGL_HAS_XLIB gboolean (*texture_pixmap_x11_create) (CoglTexturePixmapX11 *tex_pixmap); void