types/wlr_buffer: add buffer_get_drm_format helper function

This commit is contained in:
Steve Williams 2026-02-05 21:26:29 +04:00 committed by Simon Ser
parent bb78861ca9
commit ef88246642
4 changed files with 32 additions and 22 deletions

View file

@ -65,4 +65,10 @@ struct wlr_client_buffer *wlr_client_buffer_create(struct wlr_buffer *buffer,
bool wlr_client_buffer_apply_damage(struct wlr_client_buffer *client_buffer,
struct wlr_buffer *next, const pixman_region32_t *damage);
/**
* Return the DRM format of the buffer. If this buffer isn't shared
* memory or a DMA-BUF, returns DRM_FORMAT_INVALID.
*/
uint32_t buffer_get_drm_format(struct wlr_buffer *buffer);
#endif