[mutter] monitor-config-manager: Add a max_bpc field to MetaMonitorConfig



commit 4eef54f80ad2daa4fc8758ed0821de02b07c573f
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Thu Jun 9 18:46:54 2022 +0800

    monitor-config-manager: Add a max_bpc field to MetaMonitorConfig
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>

 src/backends/meta-monitor-config-manager.c | 11 +++++++++--
 src/backends/meta-monitor-config-manager.h |  2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index e782f1444e..bdafba4780 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -286,7 +286,9 @@ assign_monitor_crtc (MetaMonitor         *monitor,
     .output = output,
     .is_primary = assign_output_as_primary,
     .is_presentation = assign_output_as_presentation,
-    .is_underscanning = data->monitor_config->enable_underscanning
+    .is_underscanning = data->monitor_config->enable_underscanning,
+    .has_max_bpc = data->monitor_config->has_max_bpc,
+    .max_bpc = data->monitor_config->max_bpc
   };
 
   g_ptr_array_add (data->crtc_assignments, crtc_assignment);
@@ -694,6 +696,9 @@ create_monitor_config (MetaMonitor     *monitor,
     .enable_underscanning = meta_monitor_is_underscanning (monitor)
   };
 
+  monitor_config->has_max_bpc =
+    meta_monitor_get_max_bpc (monitor, &monitor_config->max_bpc);
+
   return monitor_config;
 }
 
@@ -1041,7 +1046,9 @@ clone_monitor_config_list (GList *monitor_configs_in)
         .monitor_spec = meta_monitor_spec_clone (monitor_config_in->monitor_spec),
         .mode_spec = g_memdup2 (monitor_config_in->mode_spec,
                                 sizeof (MetaMonitorModeSpec)),
-        .enable_underscanning = monitor_config_in->enable_underscanning
+        .enable_underscanning = monitor_config_in->enable_underscanning,
+        .has_max_bpc = monitor_config_in->has_max_bpc,
+        .max_bpc = monitor_config_in->max_bpc
       };
       monitor_configs_out =
         g_list_append (monitor_configs_out, monitor_config_out);
diff --git a/src/backends/meta-monitor-config-manager.h b/src/backends/meta-monitor-config-manager.h
index a789e2f088..bf45b23276 100644
--- a/src/backends/meta-monitor-config-manager.h
+++ b/src/backends/meta-monitor-config-manager.h
@@ -34,6 +34,8 @@ typedef struct _MetaMonitorConfig
   MetaMonitorSpec *monitor_spec;
   MetaMonitorModeSpec *mode_spec;
   gboolean enable_underscanning;
+  gboolean has_max_bpc;
+  unsigned int max_bpc;
 } MetaMonitorConfig;
 
 typedef struct _MetaLogicalMonitorConfig


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