Commit a8dc95d3 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod

Rever the patch to optimize memory usage by releasing fonts that aren't

2006-02-25  Behdad Esfahbod  <behdad@gnome.org>

        * src/vtexft.c: (_vte_xft_font_for_char): Rever the patch to
        optimize memory usage by releasing fonts that aren't needed early.
        Because that was inserting destroyed fonts into cache. Closes bug
        #332580 and reverts bug #309322.
parent 075456ee
2006-02-25 Behdad Esfahbod <behdad@gnome.org>
* src/vtexft.c: (_vte_xft_font_for_char): Rever the patch to
optimize memory usage by releasing fonts that aren't needed early.
Because that was inserting destroyed fonts into cache. Closes bug
#332580 and reverts bug #309322.
2006-02-25 Behdad Esfahbod <behdad@gnome.org>
Released vte-0.11.19.
......
......@@ -241,25 +241,15 @@ _vte_xft_font_for_char(struct _vte_xft_font *font, gunichar c)
for (i = font->fonts->len; i < font->patterns->len; i++) {
patternp = &g_array_index(font->patterns, FcPattern *, i);
ftfont = XftFontOpenPattern(display, *patternp);
/* If the font was opened, it owns the pattern. */
if (ftfont != NULL) {
*patternp = NULL;
if (_vte_xft_char_exists(font, ftfont, c)) {
g_array_append_val(font->fonts, ftfont);
break;
}
/* To save memory, close fonts that don't match the pattern */
XftFontClose(display, ftfont);
ftfont = NULL;
}
/* The patterns array must match up with the fonts array, even if
* that means appending a NULL to it.
*/
g_array_append_val(font->fonts, ftfont);
}
g_array_append_val(font->fonts, ftfont);
if ((ftfont != NULL) &&
(_vte_xft_char_exists(font, ftfont, c))) {
break;
}
}
/* No match? */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment