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
This commit is contained in:
parent
92f0eb9d14
commit
ff59b5d041
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -129,10 +129,13 @@ 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);
|
||||
|
||||
MetaMonitorTransform meta_output_logical_to_crtc_transform (MetaOutput *output,
|
||||
MetaMonitorTransform transform);
|
||||
|
||||
MetaMonitorTransform meta_output_crtc_to_logical_transform (MetaOutput *output,
|
||||
MetaMonitorTransform transform);
|
||||
|
||||
#endif /* META_OUTPUT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user