monitor: Move logical to CRTC transform helper to MetaOutput

So that it can be used on a per output basis in the future.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
This commit is contained in:
Jonas Ådahl
2020-01-14 22:21:38 +01:00
parent c447d76cd4
commit 1b67f49f7f
3 changed files with 18 additions and 7 deletions

View File

@@ -62,6 +62,20 @@ meta_output_get_assigned_crtc (MetaOutput *output)
return priv->crtc;
}
MetaMonitorTransform
meta_output_logical_to_crtc_transform (MetaOutput *output,
MetaMonitorTransform transform)
{
MetaMonitorTransform new_transform;
new_transform = (transform + output->panel_orientation_transform) %
META_MONITOR_TRANSFORM_FLIPPED;
if (meta_monitor_transform_is_flipped (transform))
new_transform += META_MONITOR_TRANSFORM_FLIPPED;
return new_transform;
}
static void
meta_output_dispose (GObject *object)
{