build: One config file to rule them all

Group all the three config files from clutter/cogl/meta into one
and also remove unnused configurations and replace duplicated ones

This also fixes Cogl usage of HAS_X11/HAS_XLIB to match the expected
build options

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3368>
This commit is contained in:
Bilal Elmoussaoui
2023-11-07 11:56:00 +01:00
committed by Marge Bot
parent ebba651c81
commit f5dac3a5d9
246 changed files with 337 additions and 409 deletions

View File

@ -37,10 +37,10 @@
#include "meta/meta-backend.h"
#include "meta/util.h"
#ifdef COGL_HAS_EGL_SUPPORT
#ifdef HAVE_EGL
#include "cogl/winsys/cogl-winsys-egl-x11-private.h"
#endif
#ifdef COGL_HAS_GLX_SUPPORT
#ifdef HAVE_GLX
#include "cogl/winsys/cogl-winsys-glx-private.h"
#endif
@ -49,7 +49,7 @@ G_DEFINE_TYPE (MetaRendererX11, meta_renderer_x11, META_TYPE_RENDERER)
static const CoglWinsysVtable *
get_x11_cogl_winsys_vtable (CoglRenderer *renderer)
{
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
#ifdef HAVE_EGL_PLATFORM_XLIB
if (meta_is_wayland_compositor ())
return _cogl_winsys_egl_xlib_get_vtable ();
#endif
@ -57,13 +57,13 @@ get_x11_cogl_winsys_vtable (CoglRenderer *renderer)
switch (renderer->driver)
{
case COGL_DRIVER_GLES2:
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
#ifdef HAVE_EGL_PLATFORM_XLIB
return _cogl_winsys_egl_xlib_get_vtable ();
#else
break;
#endif
case COGL_DRIVER_GL3:
#ifdef COGL_HAS_GLX_SUPPORT
#ifdef HAVE_GLX
return _cogl_winsys_glx_get_vtable ();
#else
break;

View File

@ -277,7 +277,7 @@ create_onscreen (CoglContext *cogl_context,
switch (cogl_renderer_get_winsys_id (cogl_renderer))
{
case COGL_WINSYS_ID_GLX:
#ifdef COGL_HAS_GLX_SUPPORT
#ifdef HAVE_GLX
return COGL_ONSCREEN (cogl_onscreen_glx_new (cogl_context,
width, height));
#else
@ -285,7 +285,7 @@ create_onscreen (CoglContext *cogl_context,
break;
#endif
case COGL_WINSYS_ID_EGL_XLIB:
#ifdef COGL_HAS_EGL_SUPPORT
#ifdef HAVE_EGL
return COGL_ONSCREEN (cogl_onscreen_xlib_new (cogl_context,
width, height));
#else

View File

@ -89,7 +89,7 @@ meta_later_destroy (MetaLater *later)
meta_later_unref (later);
}
#ifdef COGL_HAS_TRACING
#ifdef HAVE_PROFILER
static const char *
later_type_to_string (MetaLaterType when)
{

View File

@ -1,4 +1,3 @@
#include <clutter-build-config.h>
#include <glib.h>
#include <gmodule.h>
#include <stdlib.h>

View File

@ -4,7 +4,7 @@
static const ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
#ifdef COGL_HAS_XLIB
#ifdef HAVE_X11
#include <clutter/x11/clutter-x11.h>
#include <cogl/cogl-texture-pixmap-x11.h>
@ -198,13 +198,13 @@ queue_redraw (void *stage)
return TRUE;
}
#endif /* COGL_HAS_XLIB */
#endif /* HAVE_X11 */
void
test_texture_pixmap_x11 (TestUtilsGTestFixture *fixture,
void *data)
{
#ifdef COGL_HAS_XLIB
#ifdef HAVE_X11
TestState state;
unsigned int idle_handler;
@ -238,11 +238,11 @@ test_texture_pixmap_x11 (TestUtilsGTestFixture *fixture,
if (cogl_test_verbose ())
g_print ("OK\n");
#else /* COGL_HAS_XLIB */
#else /* HAVE_X11 */
if (cogl_test_verbose ())
g_print ("Skipping\n");
#endif /* COGL_HAS_XLIB */
#endif /* HAVE_X11 */
}

View File

@ -1,4 +1,4 @@
#include "cogl-config.h"
#include "config.h"
#include "cogl/cogl-bitmask.h"
#include "tests/cogl-test-utils.h"

View File

@ -1,4 +1,4 @@
#include "cogl-config.h"
#include "config.h"
#include "cogl/cogl.h"
#include "cogl/cogl-pipeline-cache-private.h"

View File

@ -1,4 +1,4 @@
#include "cogl-config.h"
#include "config.h"
#include "cogl/cogl.h"
#include "tests/cogl-test-utils.h"

View File

@ -1,4 +1,4 @@
#include "cogl-config.h"
#include "config.h"
#include "cogl/cogl.h"
#include "cogl/cogl-pipeline-state.h"

View File

@ -1,4 +1,4 @@
#include "cogl-config.h"
#include "config.h"
#include "cogl/cogl.h"
#include "cogl/cogl-pipeline-state.h"

View File

@ -1,4 +1,4 @@
#include "cogl-config.h"
#include "config.h"
#include "cogl/cogl.h"
#include "cogl/driver/gl/cogl-pipeline-vertend-glsl-private.h"

View File

@ -519,7 +519,7 @@ get_extension_event_name (MetaX11Display *x11_display,
return NULL;
}
#ifdef COGL_HAS_TRACING
#ifdef HAVE_PROFILER
static const char *
get_event_name (MetaX11Display *x11_display,
XEvent *event)

View File

@ -316,7 +316,7 @@ meta_sync_counter_update (MetaSyncCounter *sync_counter,
no_delay_frame);
}
#ifdef COGL_HAS_TRACING
#ifdef HAVE_PROFILER
if (G_UNLIKELY (cogl_is_tracing_enabled ()))
{
g_autofree char *description = NULL;
@ -384,7 +384,7 @@ do_send_frame_drawn (MetaSyncCounter *sync_counter,
XFlush (xdisplay);
meta_x11_error_trap_pop (display->x11_display);
#ifdef COGL_HAS_TRACING
#ifdef HAVE_PROFILER
if (G_UNLIKELY (cogl_is_tracing_enabled ()))
{
g_autofree char *description = NULL;
@ -445,7 +445,7 @@ do_send_frame_timings (MetaSyncCounter *sync_counter,
XFlush (xdisplay);
meta_x11_error_trap_pop (display->x11_display);
#ifdef COGL_HAS_TRACING
#ifdef HAVE_PROFILER
if (G_UNLIKELY (cogl_is_tracing_enabled ()))
{
g_autofree char *description = NULL;