monitor-config-manager: Allow backends to assign extra data
When we're configuring monitors, allow backends to add backend specific assignments during resource assignment (mapping connectors and CRTCs etc). This will later allow the native backend's KMS monitor resources to assign a primary plane and optionally a cursor plane during configuration. This will then dictate what plane will be used for primary plane updates, as well as cursor updates, until reconfigured again. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3428>
This commit is contained in:
@ -261,6 +261,12 @@ assign_monitor_crtc (MetaMonitor *monitor,
|
||||
};
|
||||
g_ptr_array_add (crtc_assignment->outputs, output);
|
||||
|
||||
if (!meta_crtc_assign_extra (crtc,
|
||||
crtc_assignment,
|
||||
data->crtc_assignments,
|
||||
error))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Only one output can be marked as primary (due to Xrandr limitation),
|
||||
* so only mark the main output of the first monitor in the logical monitor
|
||||
@ -1748,6 +1754,8 @@ meta_monitors_config_class_init (MetaMonitorsConfigClass *klass)
|
||||
static void
|
||||
meta_crtc_assignment_free (MetaCrtcAssignment *assignment)
|
||||
{
|
||||
g_clear_pointer (&assignment->backend_private,
|
||||
assignment->backend_private_destroy);
|
||||
g_ptr_array_free (assignment->outputs, TRUE);
|
||||
g_free (assignment);
|
||||
}
|
||||
|
Reference in New Issue
Block a user