mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
wlr_drm_format: Introduce drm_format_finish
This commit is contained in:
parent
e353c5c631
commit
b45396c790
7 changed files with 19 additions and 0 deletions
|
|
@ -299,6 +299,7 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
|
|||
wlr_swapchain_destroy(output->cursor_swapchain);
|
||||
output->cursor_swapchain = wlr_swapchain_create(allocator,
|
||||
width, height, format);
|
||||
wlr_drm_format_finish(format);
|
||||
free(format);
|
||||
if (output->cursor_swapchain == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to create cursor swapchain");
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ static bool output_basic_test(struct wlr_output *output,
|
|||
return false;
|
||||
}
|
||||
|
||||
wlr_drm_format_finish(format);
|
||||
free(format);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ static struct wlr_swapchain *create_swapchain(struct wlr_output *output,
|
|||
if (!allow_modifiers && (format->len != 1 || format->modifiers[0] != DRM_FORMAT_MOD_LINEAR)) {
|
||||
if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) {
|
||||
wlr_log(WLR_DEBUG, "Implicit modifiers not supported");
|
||||
wlr_drm_format_finish(format);
|
||||
free(format);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -41,6 +42,7 @@ static struct wlr_swapchain *create_swapchain(struct wlr_output *output,
|
|||
}
|
||||
|
||||
struct wlr_swapchain *swapchain = wlr_swapchain_create(allocator, width, height, format);
|
||||
wlr_drm_format_finish(format);
|
||||
free(format);
|
||||
return swapchain;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue