[gtk/debug-envvars-cleanup] gsk: Introduce new debug macros
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/debug-envvars-cleanup] gsk: Introduce new debug macros
- Date: Fri, 23 Sep 2022 01:47:06 +0000 (UTC)
commit db579c1d5e6153134941e5279c9d9974d3a6fe26
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Sep 22 21:35:24 2022 -0400
gsk: Introduce new debug macros
Introduce GSK_RENDERER_DEBUG() and GSK_DEBUG(), which
mirror the new macros in gdk. They use the same helper
function gdk_debug_message().
gsk/gskdebugprivate.h | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskdebugprivate.h b/gsk/gskdebugprivate.h
index 345c1555ab..a8a69dafc3 100644
--- a/gsk/gskdebugprivate.h
+++ b/gsk/gskdebugprivate.h
@@ -2,6 +2,7 @@
#define __GSK_DEBUG_PRIVATE_H__
#include <glib.h>
+#include "gdk/gdkdebug.h"
G_BEGIN_DECLS
@@ -41,8 +42,15 @@ gboolean gsk_check_debug_flags (GskDebugFlags flags);
} } G_STMT_END
#define GSK_RENDERER_NOTE(renderer,type,action) G_STMT_START { \
if (GSK_RENDERER_DEBUG_CHECK (renderer,type)) { \
- action; \
- } } G_STMT_END
+ action;
+
+#define GSK_RENDERER_DEBUG(renderer,type,...) \
+ if (GSK_RENDERER_DEBUG_CHECK (renderer,type)) \
+ gdk_debug_message (__VA_ARGS__); \
+
+#define GSK_DEBUG(type,...) \
+ if (GSK_DEBUG_CHECK (type)) \
+ gdk_debug_message (__VA_ARGS__); \
#else
@@ -50,6 +58,8 @@ gboolean gsk_check_debug_flags (GskDebugFlags flags);
#define GSK_RENDERER_DEBUG_CHECK(renderer,type) 0
#define GSK_NOTE(type,action)
#define GSK_RENDERER_NOTE(renderer,type,action)
+#define GSK_RENDERER_DEBUG(display,type,...)
+#define GSK_DEBUG(type,...)
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]