Mercurial > hg > xemacs-beta
diff src/console-x-impl.h @ 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 | 97eb4942aec8 |
children | f19e6bc25969 |
line wrap: on
line diff
--- a/src/console-x-impl.h Sun Jun 13 23:54:13 2010 +0900 +++ b/src/console-x-impl.h Wed Jun 23 08:04:18 2010 -0400 @@ -68,6 +68,17 @@ /* Used by x_bevel_modeline in redisplay-x.c */ Pixmap gray_pixmap; +#ifdef HAVE_XFT + /* The Xft Drawable wrapper for this device. */ + /* This is persistent to take advantage of the ability of Xft's glyph + cache in the server, and avoid rendering the font again and again... + + This is created the first time through redisplay, and destroyed when our + connection to the X display is destroyed. */ + XftDraw *xftDraw; +#endif + + /* Atoms associated with this device. */ /* allocated in Xatoms_of_device_x */ Atom Xatom_WM_PROTOCOLS; @@ -187,6 +198,7 @@ #define DEVICE_XT_APP_SHELL(d) (DEVICE_X_DATA (d)->Xt_app_shell) #define DEVICE_X_GC_CACHE(d) (DEVICE_X_DATA (d)->gc_cache) #define DEVICE_X_GRAY_PIXMAP(d) (DEVICE_X_DATA (d)->gray_pixmap) +#define DEVICE_X_XFTDRAW(d) (DEVICE_X_DATA (d)->xftDraw) #define DEVICE_X_WM_COMMAND_FRAME(d) (DEVICE_X_DATA (d)->WM_COMMAND_frame) #define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp) #define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->global_mouse_timestamp) @@ -319,17 +331,6 @@ #endif /* XIM_XLIB */ #endif /* HAVE_XIM */ -#ifdef HAVE_XFT - /* The Xft Drawable wrapper for this device. - #### Should this be per-device, or per-frame? */ - /* This is persistent to take advantage of the ability of Xft's glyph - cache in the server, and avoid rendering the font again and again... - - This is created the first time through redisplay, and destroyed when our - connection to the X display is destroyed. */ - XftDraw *xftDraw; -#endif - /* 1 if the frame is completely visible on the display, 0 otherwise. if 0 the frame may have been iconified or may be totally or partially hidden by another X window */ @@ -391,10 +392,6 @@ #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please) -#ifdef HAVE_XFT -#define FRAME_X_XFTDRAW(f) (FRAME_X_DATA (f)->xftDraw) -#endif - #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p) #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p)