From 2be16f36eda75f80520cda1425377f6d3d0b1023 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 14 Jan 2018 16:06:25 -0500 Subject: [PATCH] gsk: Add a setter for debug flags We need to set the global flags, since these are picked up initially by new renderers. --- gsk/gskdebug.c | 9 +++++++-- gsk/gskdebugprivate.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gsk/gskdebug.c b/gsk/gskdebug.c index ef117ea1b6..40a7969c81 100644 --- a/gsk/gskdebug.c +++ b/gsk/gskdebug.c @@ -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; +} diff --git a/gsk/gskdebugprivate.h b/gsk/gskdebugprivate.h index 6801416623..257212e1c1 100644 --- a/gsk/gskdebugprivate.h +++ b/gsk/gskdebugprivate.h @@ -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