comparison src/device-x.c @ 5237:6466bc9ebf15

* console-x-impl.h (DEVICE_X_XFTDRAW): Define, instead of FRAME_X_FTDRAW. (struct x_device): Add XftDraw field. (struct x_frame): Remove XftDraw field. Move XftDraw from frame to device for improved caching. * device-x.c (x_delete_device): Free XftDraw here. * frame-x.c (x_delete_frame): Remove freeing of XftDraw. * redisplay-xlike-inc.c (XLIKE_output_string): Use DEVICE_X_XFTDRAW instead of FRAME_X_XFTDRAW when lazily creating XftDraw structure.
author Jeff Sparkes <jsparkes@gmail.com>
date Wed, 23 Jun 2010 08:04:18 -0400
parents 5efbd1253905
children f19e6bc25969
comparison
equal deleted inserted replaced
5236:0f7d483cff5a 5237:6466bc9ebf15
942 { 942 {
943 Display *display; 943 Display *display;
944 #ifdef FREE_CHECKING 944 #ifdef FREE_CHECKING
945 extern void (*__free_hook) (void *); 945 extern void (*__free_hook) (void *);
946 int checking_free; 946 int checking_free;
947 #endif
948
949 #ifdef HAVE_XFT
950 /* If we have an XftDraw structure, we need to free it here.
951 We can't ever have an XftDraw without a Display, so we are safe
952 to free it in here, and we avoid too much playing around with the
953 malloc checking hooks this way. */
954 if (DEVICE_X_XFTDRAW (d))
955 {
956 XftDrawDestroy (DEVICE_X_XFTDRAW (d));
957 DEVICE_X_XFTDRAW (d) = NULL;
958 }
947 #endif 959 #endif
948 960
949 display = DEVICE_X_DISPLAY (d); 961 display = DEVICE_X_DISPLAY (d);
950 962
951 if (display) 963 if (display)