mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
crtc-kms: Get rid of meta_crtc_kms_get_modifiers
Instead get the assigned primary plane and use meta_kms_plane_get_modifiers_for_format. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3512>
This commit is contained in:
parent
2fda8ae6d9
commit
60fd80b616
@ -428,30 +428,6 @@ meta_crtc_kms_get_kms_crtc (MetaCrtcKms *crtc_kms)
|
||||
return crtc_kms->kms_crtc;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_crtc_kms_get_modifiers:
|
||||
* @crtc_kms: a #MetaCrtc object that has to be a #MetaCrtcKms
|
||||
* @format: a DRM pixel format
|
||||
*
|
||||
* Returns a pointer to a #GArray containing all the supported
|
||||
* modifiers for the given DRM pixel format on the CRTC's primary
|
||||
* plane. The array element type is uint64_t.
|
||||
*
|
||||
* The caller must not modify or destroy the array or its contents.
|
||||
*
|
||||
* Returns NULL if the modifiers are not known or the format is not
|
||||
* supported.
|
||||
*/
|
||||
GArray *
|
||||
meta_crtc_kms_get_modifiers (MetaCrtcKms *crtc_kms,
|
||||
uint32_t format)
|
||||
{
|
||||
g_return_val_if_fail (crtc_kms->assigned_primary_plane, NULL);
|
||||
|
||||
return meta_kms_plane_get_modifiers_for_format (crtc_kms->assigned_primary_plane,
|
||||
format);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_crtc_kms_supports_format:
|
||||
* @crtc_kms: a #MetaCrtcKms
|
||||
|
@ -47,9 +47,6 @@ void meta_crtc_kms_set_mode (MetaCrtcKms *crtc_kms,
|
||||
META_EXPORT_TEST
|
||||
MetaKmsCrtc * meta_crtc_kms_get_kms_crtc (MetaCrtcKms *crtc_kms);
|
||||
|
||||
GArray * meta_crtc_kms_get_modifiers (MetaCrtcKms *crtc_kms,
|
||||
uint32_t format);
|
||||
|
||||
gboolean
|
||||
meta_crtc_kms_supports_format (MetaCrtcKms *crtc_kms,
|
||||
uint32_t drm_format);
|
||||
|
@ -1801,11 +1801,14 @@ static GArray *
|
||||
get_supported_kms_modifiers (MetaCrtcKms *crtc_kms,
|
||||
uint32_t format)
|
||||
{
|
||||
MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
|
||||
GArray *modifiers;
|
||||
GArray *crtc_mods;
|
||||
unsigned int i;
|
||||
|
||||
crtc_mods = meta_crtc_kms_get_modifiers (crtc_kms, format);
|
||||
g_return_val_if_fail (plane, NULL);
|
||||
|
||||
crtc_mods = meta_kms_plane_get_modifiers_for_format (plane, format);
|
||||
if (!crtc_mods)
|
||||
return NULL;
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
#ifdef HAVE_NATIVE_BACKEND
|
||||
#include "backends/native/meta-drm-buffer-gbm.h"
|
||||
#include "backends/native/meta-kms-device.h"
|
||||
#include "backends/native/meta-kms-plane.h"
|
||||
#include "backends/native/meta-kms-utils.h"
|
||||
#include "backends/native/meta-onscreen-native.h"
|
||||
#include "backends/native/meta-renderer-native.h"
|
||||
@ -1266,9 +1267,12 @@ crtc_supports_modifier (MetaCrtcKms *crtc_kms,
|
||||
uint32_t drm_format,
|
||||
uint64_t drm_modifier)
|
||||
{
|
||||
MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
|
||||
GArray *crtc_modifiers;
|
||||
|
||||
crtc_modifiers = meta_crtc_kms_get_modifiers (crtc_kms, drm_format);
|
||||
g_return_val_if_fail (plane, FALSE);
|
||||
|
||||
crtc_modifiers = meta_kms_plane_get_modifiers_for_format (plane, drm_format);
|
||||
if (!crtc_modifiers)
|
||||
return FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user