|
|
@ -205,8 +205,6 @@ struct wlr_drm_format *wlr_drm_format_intersect(
|
|
|
|
|
|
|
|
|
|
|
|
bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst,
|
|
|
|
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) {
|
|
|
|
const struct wlr_drm_format_set *a, const struct wlr_drm_format_set *b) {
|
|
|
|
assert(dst != a && dst != b);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_drm_format_set out = {0};
|
|
|
|
struct wlr_drm_format_set out = {0};
|
|
|
|
out.capacity = a->len < b->len ? a->len : b->len;
|
|
|
|
out.capacity = a->len < b->len ? a->len : b->len;
|
|
|
|
out.formats = calloc(out.capacity, sizeof(struct wlr_drm_format *));
|
|
|
|
out.formats = calloc(out.capacity, sizeof(struct wlr_drm_format *));
|
|
|
@ -237,6 +235,7 @@ bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst,
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wlr_drm_format_set_finish(dst);
|
|
|
|
*dst = out;
|
|
|
|
*dst = out;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|