mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/drm_format_set: introduce wlr_drm_format_intersect
Intersects modifiers from two wlr_drm_format structs. If either format doesn't support modifiers, the resulting format won't support modifiers.
This commit is contained in:
parent
237c2cf2fb
commit
82443ea46b
2 changed files with 45 additions and 0 deletions
|
|
@ -4,5 +4,14 @@
|
|||
#include <wlr/render/drm_format_set.h>
|
||||
|
||||
struct wlr_drm_format *wlr_drm_format_dup(const struct wlr_drm_format *format);
|
||||
/**
|
||||
* Intersect modifiers for two DRM formats.
|
||||
*
|
||||
* Both arguments must have the same format field. If the formats aren't
|
||||
* compatible, NULL is returned. If either format doesn't support any modifier,
|
||||
* a format that doesn't support any modifier is returned.
|
||||
*/
|
||||
struct wlr_drm_format *wlr_drm_format_intersect(
|
||||
const struct wlr_drm_format *a, const struct wlr_drm_format *b);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue