kms/impl-device: Add function meta_kms_impl_device_has_cursor_plane_for
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3676>
(cherry picked from commit b620dbb188
)
This commit is contained in:
parent
d9fe1988e7
commit
aa93da72d5
2 changed files with 23 additions and 0 deletions
|
@ -198,6 +198,26 @@ meta_kms_impl_device_peek_planes (MetaKmsImplDevice *impl_device)
|
||||||
return priv->planes;
|
return priv->planes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_kms_impl_device_has_cursor_plane_for (MetaKmsImplDevice *impl_device,
|
||||||
|
MetaKmsCrtc *crtc)
|
||||||
|
{
|
||||||
|
MetaKmsImplDevicePrivate *priv =
|
||||||
|
meta_kms_impl_device_get_instance_private (impl_device);
|
||||||
|
GList *l;
|
||||||
|
|
||||||
|
for (l = priv->planes; l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaKmsPlane *plane = l->data;
|
||||||
|
|
||||||
|
if (meta_kms_plane_get_plane_type (plane) == META_KMS_PLANE_TYPE_CURSOR &&
|
||||||
|
meta_kms_plane_is_usable_with (plane, crtc))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
const MetaKmsDeviceCaps *
|
const MetaKmsDeviceCaps *
|
||||||
meta_kms_impl_device_get_caps (MetaKmsImplDevice *impl_device)
|
meta_kms_impl_device_get_caps (MetaKmsImplDevice *impl_device)
|
||||||
{
|
{
|
||||||
|
|
|
@ -119,6 +119,9 @@ GList * meta_kms_impl_device_peek_crtcs (MetaKmsImplDevice *impl_device);
|
||||||
|
|
||||||
GList * meta_kms_impl_device_peek_planes (MetaKmsImplDevice *impl_device);
|
GList * meta_kms_impl_device_peek_planes (MetaKmsImplDevice *impl_device);
|
||||||
|
|
||||||
|
gboolean meta_kms_impl_device_has_cursor_plane_for (MetaKmsImplDevice *impl_device,
|
||||||
|
MetaKmsCrtc *crtc);
|
||||||
|
|
||||||
const MetaKmsDeviceCaps * meta_kms_impl_device_get_caps (MetaKmsImplDevice *impl_device);
|
const MetaKmsDeviceCaps * meta_kms_impl_device_get_caps (MetaKmsImplDevice *impl_device);
|
||||||
|
|
||||||
GList * meta_kms_impl_device_copy_fallback_modes (MetaKmsImplDevice *impl_device);
|
GList * meta_kms_impl_device_copy_fallback_modes (MetaKmsImplDevice *impl_device);
|
||||||
|
|
Loading…
Reference in a new issue