2023-03-31 19:11:10 +00:00
|
|
|
#pragma once
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
2022-09-24 03:11:41 +00:00
|
|
|
#include "gdk/gdkdebugprivate.h"
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef enum {
|
2018-01-14 20:11:33 +00:00
|
|
|
GSK_DEBUG_RENDERER = 1 << 0,
|
2023-12-26 03:53:09 +00:00
|
|
|
GSK_DEBUG_SHADERS = 1 << 2,
|
2024-03-16 13:08:20 +00:00
|
|
|
GSK_DEBUG_VULKAN = 1 << 3,
|
|
|
|
GSK_DEBUG_FALLBACK = 1 << 4,
|
2024-07-07 03:23:57 +00:00
|
|
|
GSK_DEBUG_CACHE = 1 << 5,
|
2024-03-16 13:08:20 +00:00
|
|
|
GSK_DEBUG_VERBOSE = 1 << 6,
|
2018-01-14 20:11:33 +00:00
|
|
|
/* flags below may affect behavior */
|
2024-03-16 13:08:20 +00:00
|
|
|
GSK_DEBUG_GEOMETRY = 1 << 7,
|
|
|
|
GSK_DEBUG_FULL_REDRAW = 1 << 8,
|
|
|
|
GSK_DEBUG_STAGING = 1 << 10,
|
|
|
|
GSK_DEBUG_OFFLOAD_DISABLE = 1 << 11,
|
|
|
|
GSK_DEBUG_CAIRO = 1 << 12,
|
2016-03-17 13:48:19 +00:00
|
|
|
} GskDebugFlags;
|
|
|
|
|
2018-01-14 20:11:33 +00:00
|
|
|
#define GSK_DEBUG_ANY ((1 << 13) - 1)
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2018-01-14 14:52:52 +00:00
|
|
|
GskDebugFlags gsk_get_debug_flags (void);
|
2018-01-14 21:06:25 +00:00
|
|
|
void gsk_set_debug_flags (GskDebugFlags flags);
|
|
|
|
|
2016-03-17 13:48:19 +00:00
|
|
|
gboolean gsk_check_debug_flags (GskDebugFlags flags);
|
|
|
|
|
|
|
|
#define GSK_DEBUG_CHECK(type) G_UNLIKELY (gsk_check_debug_flags (GSK_DEBUG_ ## type))
|
2018-01-14 14:52:52 +00:00
|
|
|
#define GSK_RENDERER_DEBUG_CHECK(renderer,type) \
|
|
|
|
G_UNLIKELY ((gsk_renderer_get_debug_flags (renderer) & GSK_DEBUG_ ## type) != 0)
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2022-09-23 01:35:24 +00:00
|
|
|
#define GSK_RENDERER_DEBUG(renderer,type,...) \
|
2022-09-23 14:11:59 +00:00
|
|
|
G_STMT_START { \
|
2022-09-23 01:35:24 +00:00
|
|
|
if (GSK_RENDERER_DEBUG_CHECK (renderer,type)) \
|
|
|
|
gdk_debug_message (__VA_ARGS__); \
|
2022-09-23 14:11:59 +00:00
|
|
|
} G_STMT_END
|
2022-09-23 01:35:24 +00:00
|
|
|
|
|
|
|
#define GSK_DEBUG(type,...) \
|
2022-09-23 14:11:59 +00:00
|
|
|
G_STMT_START { \
|
2022-09-23 01:35:24 +00:00
|
|
|
if (GSK_DEBUG_CHECK (type)) \
|
|
|
|
gdk_debug_message (__VA_ARGS__); \
|
2022-09-23 14:11:59 +00:00
|
|
|
} G_STMT_END
|
2018-01-14 14:52:52 +00:00
|
|
|
|
2016-03-17 13:48:19 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|