kms/mode: Add width/height getters
This avoids some situations where one would otherwise need to fetch the drm mode to check the dimensions. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159>
This commit is contained in:
parent
990267026a
commit
758e5e23fa
@ -30,6 +30,18 @@ struct _MetaKmsMode
|
||||
drmModeModeInfo drm_mode;
|
||||
};
|
||||
|
||||
int
|
||||
meta_kms_mode_get_width (MetaKmsMode *mode)
|
||||
{
|
||||
return mode->drm_mode.hdisplay;
|
||||
}
|
||||
|
||||
int
|
||||
meta_kms_mode_get_height (MetaKmsMode *mode)
|
||||
{
|
||||
return mode->drm_mode.vdisplay;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
meta_kms_mode_create_blob_id (MetaKmsMode *mode,
|
||||
GError **error)
|
||||
|
@ -34,6 +34,10 @@ typedef enum _MetaKmsModeFlag
|
||||
META_KMS_MODE_FLAG_FALLBACK_PORTRAIT = 1 << 1,
|
||||
} MetaKmsModeFlag;
|
||||
|
||||
int meta_kms_mode_get_width (MetaKmsMode *mode);
|
||||
|
||||
int meta_kms_mode_get_height (MetaKmsMode *mode);
|
||||
|
||||
const char * meta_kms_mode_get_name (MetaKmsMode *mode);
|
||||
|
||||
MetaKmsModeFlag meta_kms_mode_get_flags (MetaKmsMode *mode);
|
||||
|
Loading…
Reference in New Issue
Block a user