summaryrefslogtreecommitdiff
path: root/frontends/gtk
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-04-11 16:32:03 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2017-04-11 16:32:03 +0100
commit2c8a47b7d44116cb29a2ba46db0118ef726615d3 (patch)
tree3873cbc9a9c4a0ac0c8213bc95ad307c5a260d95 /frontends/gtk
parent90100bbd45be8e3bc45f258a32a24f433cadbd70 (diff)
downloadnetsurf-2c8a47b7d44116cb29a2ba46db0118ef726615d3.tar.gz
netsurf-2c8a47b7d44116cb29a2ba46db0118ef726615d3.tar.bz2
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().
Diffstat (limited to 'frontends/gtk')
-rw-r--r--frontends/gtk/layout_pango.c2
1 files changed, 1 insertions, 1 deletions
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. */