From f8a9ce3f5588fc7a053fbbd7efee8d11811f333d Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 8 Jul 2022 12:15:16 +0300 Subject: [PATCH] shared/cairo-util: Do not save/restore the cairo context twice We are already doing that before calling theme_render_frame() so no need to do it again in layout creation. Signed-off-by: Marius Vlad --- shared/cairo-util.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/shared/cairo-util.c b/shared/cairo-util.c index 30670939..29553b9e 100644 --- a/shared/cairo-util.c +++ b/shared/cairo-util.c @@ -578,8 +578,6 @@ theme_render_frame(struct theme *t, PangoLayout *title_layout; PangoRectangle logical; - cairo_save(cr); - title_layout = create_layout(cr, title); pango_layout_get_pixel_extents (title_layout, NULL, &logical); @@ -623,7 +621,6 @@ theme_render_frame(struct theme *t, } #ifdef HAVE_PANGO - cairo_restore(cr); g_object_unref(title_layout); #endif }