diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-11 16:32:03 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-11 16:32:03 +0100 |
commit | 2c8a47b7d44116cb29a2ba46db0118ef726615d3 (patch) | |
tree | 3873cbc9a9c4a0ac0c8213bc95ad307c5a260d95 | |
parent | 90100bbd45be8e3bc45f258a32a24f433cadbd70 (diff) | |
download | netsurf-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().
-rw-r--r-- | frontends/gtk/layout_pango.c | 2 |
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. */ |