onscreen/native: Simplify get_supported_kms_modifiers()
This code doesn't work like the comment suggest, it simply creates a copy of the modifiers. Remove the unused code. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4168>
This commit is contained in:
parent
18fbea0b03
commit
64847aa50f
@ -2050,9 +2050,7 @@ get_supported_kms_modifiers (MetaCrtcKms *crtc_kms,
|
|||||||
uint32_t format)
|
uint32_t format)
|
||||||
{
|
{
|
||||||
MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
|
MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
|
||||||
GArray *modifiers;
|
|
||||||
GArray *crtc_mods;
|
GArray *crtc_mods;
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
g_return_val_if_fail (plane, NULL);
|
g_return_val_if_fail (plane, NULL);
|
||||||
|
|
||||||
@ -2060,26 +2058,7 @@ get_supported_kms_modifiers (MetaCrtcKms *crtc_kms,
|
|||||||
if (!crtc_mods)
|
if (!crtc_mods)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
modifiers = g_array_new (FALSE, FALSE, sizeof (uint64_t));
|
return g_array_copy (crtc_mods);
|
||||||
|
|
||||||
/*
|
|
||||||
* For each modifier from base_crtc, check if it's available on all other
|
|
||||||
* CRTCs.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < crtc_mods->len; i++)
|
|
||||||
{
|
|
||||||
uint64_t modifier = g_array_index (crtc_mods, uint64_t, i);
|
|
||||||
|
|
||||||
g_array_append_val (modifiers, modifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (modifiers->len == 0)
|
|
||||||
{
|
|
||||||
g_array_free (modifiers, TRUE);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return modifiers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GArray *
|
static GArray *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user