[Commit] Xft xftfreetype.c,1.32,1.33
Keith Packard
commit@keithp.com
Sun, 27 Apr 2003 22:20:47 -0700
Committed by: keithp
Update of /local/src/CVS/Xft
In directory home.keithp.com:/tmp/cvs-serv12923
Modified Files:
xftfreetype.c
Log Message:
Mark reduction in memory usage as fonts are destroyed
Index: xftfreetype.c
===================================================================
RCS file: /local/src/CVS/Xft/xftfreetype.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- xftfreetype.c 24 Apr 2003 16:14:58 -0000 1.32
+++ xftfreetype.c 28 Apr 2003 05:20:45 -0000 1.33
@@ -935,9 +935,13 @@
static void
XftFontDestroy (Display *dpy, XftFont *public)
{
- XftFontInt *font = (XftFontInt *) public;
- int i;
+ XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False);
+ XftFontInt *font = (XftFontInt *) public;
+ int i;
+ /* note reduction in memory use */
+ if (info)
+ info->glyph_memory -= font->glyph_memory;
/* Clean up the info */
XftFontInfoEmpty (dpy, &font->info);
/* Free the glyphset */