mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05: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
|
|
@ -115,8 +115,8 @@ font_buffer_create(struct lab_data_buffer **buffer, int max_width,
|
|||
return;
|
||||
}
|
||||
|
||||
cairo_t *cairo = (*buffer)->cairo;
|
||||
cairo_surface_t *surf = cairo_get_target(cairo);
|
||||
cairo_surface_t *surf = (*buffer)->surface;
|
||||
cairo_t *cairo = cairo_create(surf);
|
||||
|
||||
/*
|
||||
* Fill with the background color first IF the background color
|
||||
|
|
@ -171,6 +171,7 @@ font_buffer_create(struct lab_data_buffer **buffer, int max_width,
|
|||
g_object_unref(layout);
|
||||
|
||||
cairo_surface_flush(surf);
|
||||
cairo_destroy(cairo);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue