[mutter] monitor: Move logical <-> CRTC transform helpers to MetaOutput
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor: Move logical <-> CRTC transform helpers to MetaOutput
- Date: Thu, 27 Feb 2020 10:40:11 +0000 (UTC)
commit ff59b5d04181acb728511c3510c2f153330dff34
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Feb 18 11:45:26 2020 +0100
monitor: Move logical <-> CRTC transform helpers to MetaOutput
So that we avoid leaking the internal guts of MetaOutput into
MetaMonitor, while also making it possible to use it without a
MetaMonitor at hand.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1064
src/backends/meta-monitor.c | 6 +-----
src/backends/meta-output.c | 12 ++++++++++++
src/backends/meta-output.h | 7 +++++--
3 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index 768b787ac..f4d71f047 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -467,12 +467,8 @@ meta_monitor_crtc_to_logical_transform (MetaMonitor *monitor,
MetaMonitorTransform transform)
{
MetaOutput *output = meta_monitor_get_main_output (monitor);
- MetaMonitorTransform inverted_paniel_orientation_transform;
- inverted_paniel_orientation_transform =
- meta_monitor_transform_invert (output->panel_orientation_transform);
- return meta_monitor_transform_transform (transform,
- inverted_paniel_orientation_transform);
+ return meta_output_crtc_to_logical_transform (output, transform);
}
static void
diff --git a/src/backends/meta-output.c b/src/backends/meta-output.c
index 761435b59..6a1e7c803 100644
--- a/src/backends/meta-output.c
+++ b/src/backends/meta-output.c
@@ -73,6 +73,18 @@ meta_output_logical_to_crtc_transform (MetaOutput *output,
panel_orientation_transform);
}
+MetaMonitorTransform
+meta_output_crtc_to_logical_transform (MetaOutput *output,
+ MetaMonitorTransform transform)
+{
+ MetaMonitorTransform inverted_panel_orientation_transform;
+
+ inverted_panel_orientation_transform =
+ meta_monitor_transform_invert (output->panel_orientation_transform);
+ return meta_monitor_transform_transform (transform,
+ inverted_panel_orientation_transform);
+}
+
static void
meta_output_dispose (GObject *object)
{
diff --git a/src/backends/meta-output.h b/src/backends/meta-output.h
index 2372eb3ac..1c62fc1d4 100644
--- a/src/backends/meta-output.h
+++ b/src/backends/meta-output.h
@@ -129,10 +129,13 @@ void meta_output_assign_crtc (MetaOutput *output,
META_EXPORT_TEST
void meta_output_unassign_crtc (MetaOutput *output);
+META_EXPORT_TEST
+MetaCrtc * meta_output_get_assigned_crtc (MetaOutput *output);
+
MetaMonitorTransform meta_output_logical_to_crtc_transform (MetaOutput *output,
MetaMonitorTransform transform);
-META_EXPORT_TEST
-MetaCrtc * meta_output_get_assigned_crtc (MetaOutput *output);
+MetaMonitorTransform meta_output_crtc_to_logical_transform (MetaOutput *output,
+ MetaMonitorTransform transform);
#endif /* META_OUTPUT_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]