From 2c996a1b165002822d4d23a596e68717d4e93502 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 12 Jun 2024 13:27:33 +0200 Subject: [PATCH] build/cogl: Simplify debug c-args Part-of: --- cogl/cogl/driver/gl/cogl-util-gl-private.h | 6 +++--- cogl/cogl/driver/gl/cogl-util-gl.c | 6 +++--- cogl/meson.build | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cogl/cogl/driver/gl/cogl-util-gl-private.h b/cogl/cogl/driver/gl/cogl-util-gl-private.h index d281b4595..65097e499 100644 --- a/cogl/cogl/driver/gl/cogl-util-gl-private.h +++ b/cogl/cogl/driver/gl/cogl-util-gl-private.h @@ -42,7 +42,7 @@ #define GL_CONTEXT_LOST GL_CONTEXT_LOST_KHR #endif -#ifdef COGL_GL_DEBUG +#ifdef COGL_ENABLE_DEBUG const char * _cogl_gl_error_to_string (GLenum error_code); @@ -69,12 +69,12 @@ _cogl_gl_error_to_string (GLenum error_code); _cogl_gl_error_to_string (__err)); \ } } G_STMT_END -#else /* !COGL_GL_DEBUG */ +#else /* !COGL_ENABLE_DEBUG */ #define GE(ctx, x) ((ctx)->x) #define GE_RET(ret, ctx, x) (ret = ((ctx)->x)) -#endif /* COGL_GL_DEBUG */ +#endif /* COGL_ENABLE_DEBUG */ typedef struct _CoglGLContext { GArray *texture_units; diff --git a/cogl/cogl/driver/gl/cogl-util-gl.c b/cogl/cogl/driver/gl/cogl-util-gl.c index 8e18ad378..f8dad822d 100644 --- a/cogl/cogl/driver/gl/cogl-util-gl.c +++ b/cogl/cogl/driver/gl/cogl-util-gl.c @@ -58,7 +58,7 @@ #define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 #endif -#ifdef COGL_GL_DEBUG +#ifdef COGL_ENABLE_DEBUG /* GL error to string conversion */ static const struct { GLuint error_code; @@ -94,7 +94,7 @@ _cogl_gl_error_to_string (GLenum error_code) return "Unknown GL error"; } -#endif /* COGL_GL_DEBUG */ +#endif /* COGL_ENABLE_DEBUG */ CoglGLContext * _cogl_driver_gl_context (CoglContext *context) @@ -301,7 +301,7 @@ _cogl_gl_util_catch_out_of_memory (CoglContext *ctx, GError **error) { if (gl_error == GL_OUT_OF_MEMORY) out_of_memory = TRUE; -#ifdef COGL_GL_DEBUG +#ifdef COGL_ENABLE_DEBUG else { g_warning ("%s: GL error (%d): %s\n", diff --git a/cogl/meson.build b/cogl/meson.build index 25120f954..a759d1998 100644 --- a/cogl/meson.build +++ b/cogl/meson.build @@ -86,8 +86,6 @@ cogl_debug_c_args = [] if buildtype != 'plain' if get_option('debug') cogl_debug_c_args += [ - '-DCOGL_GL_DEBUG', - '-DCOGL_OBJECT_DEBUG', '-DCOGL_ENABLE_DEBUG', ] else