kms/cursor-manager: Fix backwards FB_UNCHANGED flag

It was causing the simple/legacy backend to never upload cursor buffers.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2927,
       https://gitlab.gnome.org/GNOME/mutter/-/issues/2931

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3144>
This commit is contained in:
Daniel van Vugt 2023-08-02 16:15:11 +08:00
parent 9b28b7fcce
commit 6c97bd79d7

View File

@ -372,10 +372,13 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
if (crtc_state_impl->pending_buffer != crtc_state_impl->buffer)
{
assign_plane_flags |= META_KMS_ASSIGN_PLANE_FLAG_FB_UNCHANGED;
*old_buffer = g_steal_pointer (&crtc_state_impl->pending_buffer);
crtc_state_impl->pending_buffer = g_object_ref (buffer);
}
else
{
assign_plane_flags |= META_KMS_ASSIGN_PLANE_FLAG_FB_UNCHANGED;
}
width = meta_drm_buffer_get_width (buffer);
height = meta_drm_buffer_get_height (buffer);