mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/drm-format-set: add wlr_drm_format_set_intersect
This intersects two DRM format sets. This is useful for implementing DMA-BUF feedback in compositors, see e.g. the Sway PR [1]. [1]: https://github.com/swaywm/sway/pull/6313
This commit is contained in:
parent
92080b3a01
commit
7201aae3d6
2 changed files with 47 additions and 0 deletions
|
|
@ -63,4 +63,13 @@ bool wlr_drm_format_set_has(const struct wlr_drm_format_set *set,
|
|||
bool wlr_drm_format_set_add(struct wlr_drm_format_set *set, uint32_t format,
|
||||
uint64_t modifier);
|
||||
|
||||
/**
|
||||
* Intersect two DRM format sets `a` and `b`, storing in the destination set
|
||||
* `dst` the format + modifier pairs which are in both source sets.
|
||||
*
|
||||
* Returns false on failure or when the intersection is empty.
|
||||
*/
|
||||
bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst,
|
||||
const struct wlr_drm_format_set *a, const struct wlr_drm_format_set *b);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue