[gtk+] gsk: Add a setter for debug flags



commit 2be16f36eda75f80520cda1425377f6d3d0b1023
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 14 16:06:25 2018 -0500

    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 ef117ea..40a7969 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 6801416..257212e 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]