gsk: Add a setter for debug flags

We need to set the global flags, since these are picked
up initially by new renderers.
This commit is contained in:
Matthias Clasen 2018-01-14 16:06:25 -05:00
parent ba21a7764b
commit 2be16f36ed
2 changed files with 9 additions and 2 deletions

View File

@ -43,7 +43,6 @@ gboolean
gsk_check_debug_flags (GskDebugFlags flags)
{
init_debug_flags ();
return (gsk_debug_flags & flags) != 0;
}
@ -51,6 +50,12 @@ GskDebugFlags
gsk_get_debug_flags (void)
{
init_debug_flags ();
return gsk_debug_flags;
}
void
gsk_set_debug_flags (GskDebugFlags flags)
{
init_debug_flags ();
gsk_debug_flags = flags;
}

View File

@ -25,6 +25,8 @@ typedef enum {
#define GSK_DEBUG_ANY ((1 << 13) - 1)
GskDebugFlags gsk_get_debug_flags (void);
void gsk_set_debug_flags (GskDebugFlags flags);
gboolean gsk_check_debug_flags (GskDebugFlags flags);
#ifdef G_ENABLE_DEBUG