[mutter] util: Add 'color' debug topic



commit b6aea1318d901ddc8250ca6854304c33aec339d7
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon Oct 25 16:41:11 2021 +0200

    util: Add 'color' debug topic
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2141>

 src/backends/native/meta-monitor-manager-native.c | 5 +++--
 src/core/util.c                                   | 3 +++
 src/meta/util.h                                   | 2 ++
 3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-monitor-manager-native.c 
b/src/backends/native/meta-monitor-manager-native.c
index 90fae7d426..f967fbf15b 100644
--- a/src/backends/native/meta-monitor-manager-native.c
+++ b/src/backends/native/meta-monitor-manager-native.c
@@ -508,8 +508,9 @@ meta_monitor_manager_native_set_crtc_gamma (MetaMonitorManager *manager,
                                                  red, green, blue));
 
   gamma_ramp_string = generate_gamma_ramp_string (size, red, green, blue);
-  g_debug ("Setting CRTC (%" G_GUINT64_FORMAT ") gamma to %s",
-           meta_crtc_get_id (crtc), gamma_ramp_string);
+  meta_topic (META_DEBUG_COLOR,
+              "Setting CRTC (%" G_GUINT64_FORMAT ") gamma to %s",
+              meta_crtc_get_id (crtc), gamma_ramp_string);
 
   meta_crtc_kms_invalidate_gamma (crtc_kms);
   clutter_stage_schedule_update (stage);
diff --git a/src/core/util.c b/src/core/util.c
index 10c59ed7db..5b62279ec2 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -73,6 +73,7 @@ static const GDebugKey meta_debug_keys[] = {
   { "remote-desktop", META_DEBUG_REMOTE_DESKTOP },
   { "backend", META_DEBUG_BACKEND },
   { "render", META_DEBUG_RENDER },
+  { "color", META_DEBUG_COLOR },
 };
 
 static gint verbose_topics = 0;
@@ -317,6 +318,8 @@ meta_topic_to_string (MetaDebugTopic topic)
       return "BACKEND";
     case META_DEBUG_RENDER:
       return "RENDER";
+    case META_DEBUG_COLOR:
+      return "COLOR";
     case META_DEBUG_VERBOSE:
       return "VERBOSE";
     }
diff --git a/src/meta/util.h b/src/meta/util.h
index 6c54f55791..2366b1b1f0 100644
--- a/src/meta/util.h
+++ b/src/meta/util.h
@@ -74,6 +74,7 @@ void meta_fatal      (const char *format,
  * @META_DEBUG_REMOTE_DESKTOP: remote desktop
  * @META_DEBUG_BACKEND: backend
  * @META_DEBUG_RENDER: native backend rendering
+ * @META_DEBUG_COLOR: color management
  */
 typedef enum
 {
@@ -104,6 +105,7 @@ typedef enum
   META_DEBUG_REMOTE_DESKTOP  = 1 << 23,
   META_DEBUG_BACKEND         = 1 << 24,
   META_DEBUG_RENDER          = 1 << 25,
+  META_DEBUG_COLOR           = 1 << 26,
 } MetaDebugTopic;
 
 /**


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