From 2c8a47b7d44116cb29a2ba46db0118ef726615d3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 11 Apr 2017 16:32:03 +0100 Subject: GTK: Slight optimisation to nsfont_split(). When we aren't modifying the line, pango_layout_get_line_readonly() is a faster alternative to pango_layout_get_line(). --- frontends/gtk/layout_pango.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/gtk/layout_pango.c b/frontends/gtk/layout_pango.c index 5276148e4..fb065b127 100644 --- a/frontends/gtk/layout_pango.c +++ b/frontends/gtk/layout_pango.c @@ -194,7 +194,7 @@ nsfont_split(const plot_font_style_t *fstyle, pango_layout_set_single_paragraph_mode(layout, TRUE); /* Obtain the second line of the layout (if there is one) */ - line = pango_layout_get_line(layout, 1); + line = pango_layout_get_line_readonly(layout, 1); if (line != NULL) { /* Pango split the text. The line's start_index indicates the * start of the character after the line break. */ -- cgit v1.2.3