[mutter] monitor-test-utils: Add max_bpc field
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-test-utils: Add max_bpc field
- Date: Fri, 19 Aug 2022 19:31:12 +0000 (UTC)
commit cc203e241df9dabfd533552405ad54b8b81e4f87
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Wed Jun 29 17:32:49 2022 +0800
monitor-test-utils: Add max_bpc field
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>
src/tests/meta-monitor-test-utils.c | 8 ++++++++
src/tests/meta-monitor-test-utils.h | 2 ++
2 files changed, 10 insertions(+)
---
diff --git a/src/tests/meta-monitor-test-utils.c b/src/tests/meta-monitor-test-utils.c
index aab9e18589..2cb41cd13c 100644
--- a/src/tests/meta-monitor-test-utils.c
+++ b/src/tests/meta-monitor-test-utils.c
@@ -387,11 +387,17 @@ meta_check_monitor_configuration (MetaContext *context,
{
MetaOutput *output = l_output->data;
uint64_t winsys_id = expect->monitors[i].outputs[j];
+ unsigned int output_max_bpc;
g_assert (output == output_from_winsys_id (backend, winsys_id));
g_assert_cmpint (expect->monitors[i].is_underscanning,
==,
meta_output_is_underscanning (output));
+
+ if (!meta_output_get_max_bpc (output, &output_max_bpc))
+ output_max_bpc = 0;
+
+ g_assert_cmpint (expect->monitors[i].max_bpc, ==, output_max_bpc);
}
meta_monitor_get_physical_dimensions (monitor, &width_mm, &height_mm);
@@ -778,6 +784,8 @@ meta_create_monitor_test_setup (MetaBackend *backend,
output_assignment = (MetaOutputAssignment) {
.is_underscanning = setup->outputs[i].is_underscanning,
+ .has_max_bpc = !!setup->outputs[i].max_bpc,
+ .max_bpc = setup->outputs[i].max_bpc,
};
meta_output_assign_crtc (output, crtc, &output_assignment);
}
diff --git a/src/tests/meta-monitor-test-utils.h b/src/tests/meta-monitor-test-utils.h
index 988a4115e8..ceae9d52aa 100644
--- a/src/tests/meta-monitor-test-utils.h
+++ b/src/tests/meta-monitor-test-utils.h
@@ -106,6 +106,7 @@ typedef struct _MonitorTestCaseOutput
float scale;
gboolean is_laptop_panel;
gboolean is_underscanning;
+ unsigned int max_bpc;
const char *serial;
MetaMonitorTransform panel_orientation_transform;
gboolean hotplug_mode;
@@ -157,6 +158,7 @@ typedef struct _MonitorTestCaseMonitor
int width_mm;
int height_mm;
gboolean is_underscanning;
+ unsigned int max_bpc;
} MonitorTestCaseMonitor;
typedef struct _MonitorTestCaseLogicalMonitor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]