[mutter/bilelmoussaoui/meson-without-x11: 5/7] cogl: Unify HAS_X11/HAS_XLIB build configs




commit a0ebe216132b710caab550921dc039e70c7f719b
Author: Bilal Elmoussaoui <belmouss redhat com>
Date:   Tue May 3 12:53:45 2022 +0200

    cogl: Unify HAS_X11/HAS_XLIB build configs

 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 911b0abdd4..0e80f1282c 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 a8bf459196..d6e55a1b11 100644
--- a/cogl/cogl/cogl-mutter.h
+++ b/cogl/cogl/cogl-mutter.h
@@ -45,7 +45,7 @@
 #if defined (COGL_HAS_GLX_SUPPORT)
 #include <cogl/winsys/cogl-onscreen-glx.h>
 #endif
-#if defined (COGL_HAS_XLIB_SUPPORT)
+#if defined (COGL_HAS_XLIB)
 #include <cogl/winsys/cogl-onscreen-xlib.h>
 #endif
 #ifdef COGL_HAS_X11
diff --git a/cogl/cogl/cogl-renderer-private.h b/cogl/cogl/cogl-renderer-private.h
index 66634c0752..b37a5aa7cb 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 38f7a36d77..ccf3b766e0 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 a2528c8be1..9bbdf1717b 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 d5da0151ea..fa34eac52d 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 45aec7ea64..98b5793f2c 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 <X11/Xutil.h>
 #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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]