mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
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:
parent
c48324975d
commit
4502d58eec
8 changed files with 39 additions and 22 deletions
|
|
@ -39,7 +39,7 @@ _create_buffer(struct scaled_scene_buffer *scaled_buffer, double scale)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
cairo_t *cairo = buffer->cairo;
|
||||
cairo_t *cairo = cairo_create(buffer->surface);
|
||||
|
||||
/* Clear background */
|
||||
cairo_set_operator(cairo, CAIRO_OPERATOR_CLEAR);
|
||||
|
|
@ -58,6 +58,8 @@ _create_buffer(struct scaled_scene_buffer *scaled_buffer, double scale)
|
|||
set_cairo_color(cairo, self->border_color);
|
||||
cairo_stroke(cairo);
|
||||
|
||||
cairo_destroy(cairo);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue