comparison src/redisplay-xlike-inc.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 bc3ede8f29a8
children f19e6bc25969
comparison
equal deleted inserted replaced
5236:0f7d483cff5a 5237:6466bc9ebf15
1026 Visual *visual = DEVICE_X_VISUAL (d); 1026 Visual *visual = DEVICE_X_VISUAL (d);
1027 static XftColor fg, bg; 1027 static XftColor fg, bg;
1028 XftDraw *xftDraw; 1028 XftDraw *xftDraw;
1029 1029
1030 /* Lazily initialize frame's xftDraw member. */ 1030 /* Lazily initialize frame's xftDraw member. */
1031 if (!FRAME_X_XFTDRAW (f)) { 1031 if (!DEVICE_X_XFTDRAW (d)) {
1032 FRAME_X_XFTDRAW (f) = XftDrawCreate (dpy, x_win, visual, cmap); 1032 DEVICE_X_XFTDRAW (d) = XftDrawCreate (dpy, x_win, visual, cmap);
1033 } 1033 }
1034 xftDraw = FRAME_X_XFTDRAW (f); 1034 xftDraw = DEVICE_X_XFTDRAW (d);
1035 1035
1036 /* #### This will probably cause asserts when passed a Lisp integer for a 1036 /* #### This will probably cause asserts when passed a Lisp integer for a
1037 color. See ca. line 759 this file. 1037 color. See ca. line 759 this file.
1038 #### Maybe xft_convert_color should take an XColor, not a pixel. */ 1038 #### Maybe xft_convert_color should take an XColor, not a pixel. */
1039 #define XFT_FROB_LISP_COLOR(color, dim) \ 1039 #define XFT_FROB_LISP_COLOR(color, dim) \