crtc-kms: Get rid of meta_crtc_kms_copy_drm_format_list

Instead get the assigned primary plane and use
meta_kms_plane_copy_drm_format_list.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3512>
This commit is contained in:
Sebastian Wick 2024-01-10 15:00:16 +01:00 committed by Robert Mader
parent ee60e33d95
commit 2fda8ae6d9
3 changed files with 2 additions and 20 deletions

View File

@ -452,22 +452,6 @@ meta_crtc_kms_get_modifiers (MetaCrtcKms *crtc_kms,
format);
}
/**
* meta_crtc_kms_copy_drm_format_list:
* @crtc_kms: a #MetaCrtc object that has to be a #MetaCrtcKms
*
* Returns a new #GArray that the caller must destroy. The array
* contains all the DRM pixel formats the CRTC supports on
* its primary plane. The array element type is uint32_t.
*/
GArray *
meta_crtc_kms_copy_drm_format_list (MetaCrtcKms *crtc_kms)
{
g_return_val_if_fail (crtc_kms->assigned_primary_plane, NULL);
return meta_kms_plane_copy_drm_format_list (crtc_kms->assigned_primary_plane);
}
/**
* meta_crtc_kms_supports_format:
* @crtc_kms: a #MetaCrtcKms

View File

@ -50,9 +50,6 @@ MetaKmsCrtc * meta_crtc_kms_get_kms_crtc (MetaCrtcKms *crtc_kms);
GArray * meta_crtc_kms_get_modifiers (MetaCrtcKms *crtc_kms,
uint32_t format);
GArray *
meta_crtc_kms_copy_drm_format_list (MetaCrtcKms *crtc_kms);
gboolean
meta_crtc_kms_supports_format (MetaCrtcKms *crtc_kms,
uint32_t drm_format);

View File

@ -1906,8 +1906,9 @@ get_supported_kms_formats (CoglOnscreen *onscreen)
{
MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc);
MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
return meta_crtc_kms_copy_drm_format_list (crtc_kms);
return meta_kms_plane_copy_drm_format_list (plane);
}
static gboolean