mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
wlr_drm_format: Change wlr_drm_format_dup to copy
This commit is contained in:
parent
099a147439
commit
340700cb70
6 changed files with 31 additions and 24 deletions
|
|
@ -210,8 +210,13 @@ struct wlr_drm_format *output_pick_format(struct wlr_output *output,
|
|||
}
|
||||
format = wlr_drm_format_intersect(display_format, render_format);
|
||||
} else {
|
||||
format = calloc(1, sizeof(*format));
|
||||
if (!format) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The output can display any format
|
||||
format = wlr_drm_format_dup(render_format);
|
||||
wlr_drm_format_copy(format, render_format);
|
||||
}
|
||||
|
||||
if (format == NULL) {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ bool wlr_output_configure_primary_swapchain(struct wlr_output *output,
|
|||
struct wlr_swapchain *old_swapchain = *swapchain_ptr;
|
||||
if (old_swapchain != NULL &&
|
||||
old_swapchain->width == width && old_swapchain->height == height &&
|
||||
old_swapchain->format->format == output->render_format) {
|
||||
old_swapchain->format.format == output->render_format) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue