diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-05-04 19:24:44 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-05-11 18:24:43 +0200 |
commit | 90d08f8f1c40e2a302d62052435ff2abdb08a854 (patch) | |
tree | a3accd6bbb593af732b5f1207e92bd407470992b /include/render | |
parent | 340700cb7085aff743f929845604ef95feb5820e (diff) |
wlr_drm_format: Rework wlr_drm_format_intersect
Now it takes a reference to a destination format
Diffstat (limited to 'include/render')
-rw-r--r-- | include/render/drm_format_set.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/render/drm_format_set.h b/include/render/drm_format_set.h index 1ffc2a90..ea192a50 100644 --- a/include/render/drm_format_set.h +++ b/include/render/drm_format_set.h @@ -8,13 +8,14 @@ bool wlr_drm_format_has(const struct wlr_drm_format *fmt, uint64_t modifier); bool wlr_drm_format_add(struct wlr_drm_format *fmt, uint64_t modifier); bool wlr_drm_format_copy(struct wlr_drm_format *dst, const struct wlr_drm_format *src); /** - * Intersect modifiers for two DRM formats. + * Intersect modifiers for two DRM formats. The `dst` must be zeroed or initialized + * with other state being replaced. * * 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( +bool wlr_drm_format_intersect(struct wlr_drm_format *dst, const struct wlr_drm_format *a, const struct wlr_drm_format *b); bool wlr_drm_format_set_copy(struct wlr_drm_format_set *dst, const struct wlr_drm_format_set *src); |