buffer: remove buffer->cairo

It's more common for cairo_t to have a temporary lifetime and it will
prevent accidentally reusing its previous state.
This commit is contained in:
tokyo4j 2024-11-28 06:58:17 +09:00 committed by Hiroaki Yamamoto
parent c48324975d
commit 4502d58eec
8 changed files with 39 additions and 22 deletions

View file

@ -354,8 +354,9 @@ display_osd(struct output *output, struct wl_array *views)
}
/* Render OSD image */
cairo_t *cairo = buffer->cairo;
cairo_t *cairo = cairo_create(buffer->surface);
render_osd(server, cairo, w, h, show_workspace, workspace_name, views);
cairo_destroy(cairo);
struct wlr_scene_buffer *scene_buffer = wlr_scene_buffer_create(
output->osd_tree, &buffer->base);