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:
parent
c447d76cd4
commit
1b67f49f7f
@ -455,14 +455,8 @@ meta_monitor_logical_to_crtc_transform (MetaMonitor *monitor,
|
||||
MetaMonitorTransform transform)
|
||||
{
|
||||
MetaOutput *output = meta_monitor_get_main_output (monitor);
|
||||
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;
|
||||
return meta_output_logical_to_crtc_transform (output, transform);
|
||||
}
|
||||
|
||||
MetaMonitorTransform
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -129,6 +129,9 @@ void meta_output_assign_crtc (MetaOutput *output,
|
||||
META_EXPORT_TEST
|
||||
void meta_output_unassign_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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user