2016-03-17 13:48:19 +00:00
|
|
|
#ifndef __GSK_DEBUG_PRIVATE_H__
|
|
|
|
#define __GSK_DEBUG_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GSK_DEBUG_RENDER_NODE = 1 << 0,
|
|
|
|
GSK_DEBUG_RENDERER = 1 << 1,
|
|
|
|
GSK_DEBUG_CAIRO = 1 << 2,
|
2016-07-08 15:22:33 +00:00
|
|
|
GSK_DEBUG_OPENGL = 1 << 3,
|
2016-08-03 01:53:31 +00:00
|
|
|
GSK_DEBUG_SHADERS = 1 << 4,
|
2016-08-06 13:37:47 +00:00
|
|
|
GSK_DEBUG_TRANSFORMS = 1 << 5,
|
2016-11-30 01:07:57 +00:00
|
|
|
GSK_DEBUG_SURFACE = 1 << 6,
|
2016-12-23 23:52:07 +00:00
|
|
|
GSK_DEBUG_VULKAN = 1 << 7,
|
2017-09-20 03:59:44 +00:00
|
|
|
GSK_DEBUG_FALLBACK = 1 << 8,
|
|
|
|
GSK_DEBUG_GLYPH_CACHE = 1 << 9
|
2016-03-17 13:48:19 +00:00
|
|
|
} GskDebugFlags;
|
|
|
|
|
2017-09-03 15:29:29 +00:00
|
|
|
#define GSK_DEBUG_ANY ((1 << 9) - 1)
|
|
|
|
|
2016-03-17 13:48:19 +00:00
|
|
|
typedef enum {
|
2016-12-15 23:22:23 +00:00
|
|
|
GSK_RENDERING_MODE_GEOMETRY = 1 << 0,
|
|
|
|
GSK_RENDERING_MODE_SHADERS = 1 << 1,
|
|
|
|
GSK_RENDERING_MODE_SYNC = 1 << 2,
|
2016-12-26 23:33:34 +00:00
|
|
|
GSK_RENDERING_MODE_FULL_REDRAW = 1 << 3,
|
|
|
|
GSK_RENDERING_MODE_STAGING_IMAGE = 1 << 4,
|
|
|
|
GSK_RENDERING_MODE_STAGING_BUFFER = 1 << 5
|
2016-03-17 13:48:19 +00:00
|
|
|
} GskRenderingMode;
|
|
|
|
|
|
|
|
gboolean gsk_check_debug_flags (GskDebugFlags flags);
|
|
|
|
|
|
|
|
gboolean gsk_check_rendering_flags (GskRenderingMode flags);
|
|
|
|
|
|
|
|
#ifdef G_ENABLE_DEBUG
|
|
|
|
|
|
|
|
#define GSK_DEBUG_CHECK(type) G_UNLIKELY (gsk_check_debug_flags (GSK_DEBUG_ ## type))
|
2016-08-03 01:56:17 +00:00
|
|
|
#define GSK_DEBUG_CHECK2(type1,type2) G_UNLIKELY (gsk_check_debug_flags (GSK_DEBUG_ ## type1 | GSK_DEBUG_ ## type2))
|
2016-03-17 13:48:19 +00:00
|
|
|
#define GSK_RENDER_MODE_CHECK(type) G_UNLIKELY (gsk_check_rendering_flags (GSK_RENDERING_MODE_ ## type))
|
|
|
|
|
|
|
|
#define GSK_NOTE(type,action) G_STMT_START { \
|
|
|
|
if (GSK_DEBUG_CHECK (type)) { \
|
|
|
|
action; \
|
|
|
|
} } G_STMT_END
|
|
|
|
|
2016-08-03 01:56:17 +00:00
|
|
|
#define GSK_NOTE2(type1,type2,action) G_STMT_START { \
|
|
|
|
if (GSK_DEBUG_CHECK2 (type1, type2)) { \
|
|
|
|
action; \
|
|
|
|
} } G_STMT_END
|
2016-03-17 13:48:19 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
#define GSK_RENDER_MODE_CHECK(type) 0
|
|
|
|
#define GSK_DEBUG_CHECK(type) 0
|
2016-08-03 01:56:17 +00:00
|
|
|
#define GSK_DEBUG_CHECK2(type1,type2) 0
|
2016-03-17 13:48:19 +00:00
|
|
|
#define GSK_NOTE(type,action)
|
2016-08-03 01:56:17 +00:00
|
|
|
#define GSK_NOTE2(type1,type2,action)
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_DEBUG_PRIVATE_H__ */
|