cursor-renderer/native: Update HW state during frames

Before each frame is maybe redrawn, push any new cursor KMS state to the
pending update. It'll then either be posted during the next page flip,
or when the same frame finishes, in case nothing was redrawn.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
Jonas Ådahl
2020-10-10 01:02:28 +02:00
committed by Marge Bot
parent 487ea0dd95
commit c985753442
12 changed files with 359 additions and 257 deletions

View File

@ -1948,6 +1948,28 @@ meta_monitor_mode_foreach_output (MetaMonitor *monitor,
return TRUE;
}
MetaMonitorCrtcMode *
meta_monitor_get_crtc_mode_for_output (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaOutput *output)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
GList *l;
int i;
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
MetaMonitorCrtcMode *monitor_crtc_mode = &mode->crtc_modes[i];
if (monitor_crtc_mode->output == output)
return monitor_crtc_mode;
}
g_warn_if_reached ();
return NULL;
}
const char *
meta_monitor_get_display_name (MetaMonitor *monitor)
{