Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5236:0f7d483cff5a | 5237:6466bc9ebf15 |
---|---|
65 int depth; | 65 int depth; |
66 Colormap device_cmap; | 66 Colormap device_cmap; |
67 | 67 |
68 /* Used by x_bevel_modeline in redisplay-x.c */ | 68 /* Used by x_bevel_modeline in redisplay-x.c */ |
69 Pixmap gray_pixmap; | 69 Pixmap gray_pixmap; |
70 | |
71 #ifdef HAVE_XFT | |
72 /* The Xft Drawable wrapper for this device. */ | |
73 /* This is persistent to take advantage of the ability of Xft's glyph | |
74 cache in the server, and avoid rendering the font again and again... | |
75 | |
76 This is created the first time through redisplay, and destroyed when our | |
77 connection to the X display is destroyed. */ | |
78 XftDraw *xftDraw; | |
79 #endif | |
80 | |
70 | 81 |
71 /* Atoms associated with this device. */ | 82 /* Atoms associated with this device. */ |
72 /* allocated in Xatoms_of_device_x */ | 83 /* allocated in Xatoms_of_device_x */ |
73 Atom Xatom_WM_PROTOCOLS; | 84 Atom Xatom_WM_PROTOCOLS; |
74 Atom Xatom_WM_DELETE_WINDOW; | 85 Atom Xatom_WM_DELETE_WINDOW; |
185 #define DEVICE_X_DEPTH(d) (DEVICE_X_DATA (d)->depth) | 196 #define DEVICE_X_DEPTH(d) (DEVICE_X_DATA (d)->depth) |
186 #define DEVICE_X_COLORMAP(d) (DEVICE_X_DATA (d)->device_cmap) | 197 #define DEVICE_X_COLORMAP(d) (DEVICE_X_DATA (d)->device_cmap) |
187 #define DEVICE_XT_APP_SHELL(d) (DEVICE_X_DATA (d)->Xt_app_shell) | 198 #define DEVICE_XT_APP_SHELL(d) (DEVICE_X_DATA (d)->Xt_app_shell) |
188 #define DEVICE_X_GC_CACHE(d) (DEVICE_X_DATA (d)->gc_cache) | 199 #define DEVICE_X_GC_CACHE(d) (DEVICE_X_DATA (d)->gc_cache) |
189 #define DEVICE_X_GRAY_PIXMAP(d) (DEVICE_X_DATA (d)->gray_pixmap) | 200 #define DEVICE_X_GRAY_PIXMAP(d) (DEVICE_X_DATA (d)->gray_pixmap) |
201 #define DEVICE_X_XFTDRAW(d) (DEVICE_X_DATA (d)->xftDraw) | |
190 #define DEVICE_X_WM_COMMAND_FRAME(d) (DEVICE_X_DATA (d)->WM_COMMAND_frame) | 202 #define DEVICE_X_WM_COMMAND_FRAME(d) (DEVICE_X_DATA (d)->WM_COMMAND_frame) |
191 #define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp) | 203 #define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp) |
192 #define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->global_mouse_timestamp) | 204 #define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->global_mouse_timestamp) |
193 #define DEVICE_X_LAST_SERVER_TIMESTAMP(d) (DEVICE_X_DATA (d)->last_server_timestamp) | 205 #define DEVICE_X_LAST_SERVER_TIMESTAMP(d) (DEVICE_X_DATA (d)->last_server_timestamp) |
194 #define DEVICE_X_KEYSYM_MAP_HASH_TABLE(d) (DEVICE_X_DATA (d)->x_keysym_map_hash_table) | 206 #define DEVICE_X_KEYSYM_MAP_HASH_TABLE(d) (DEVICE_X_DATA (d)->x_keysym_map_hash_table) |
317 /* Could get these at any time by asking xic, but... */ | 329 /* Could get these at any time by asking xic, but... */ |
318 XIMStyle xic_style; /* XIM Style cache */ | 330 XIMStyle xic_style; /* XIM Style cache */ |
319 #endif /* XIM_XLIB */ | 331 #endif /* XIM_XLIB */ |
320 #endif /* HAVE_XIM */ | 332 #endif /* HAVE_XIM */ |
321 | 333 |
322 #ifdef HAVE_XFT | |
323 /* The Xft Drawable wrapper for this device. | |
324 #### Should this be per-device, or per-frame? */ | |
325 /* This is persistent to take advantage of the ability of Xft's glyph | |
326 cache in the server, and avoid rendering the font again and again... | |
327 | |
328 This is created the first time through redisplay, and destroyed when our | |
329 connection to the X display is destroyed. */ | |
330 XftDraw *xftDraw; | |
331 #endif | |
332 | |
333 /* 1 if the frame is completely visible on the display, 0 otherwise. | 334 /* 1 if the frame is completely visible on the display, 0 otherwise. |
334 if 0 the frame may have been iconified or may be totally | 335 if 0 the frame may have been iconified or may be totally |
335 or partially hidden by another X window */ | 336 or partially hidden by another X window */ |
336 unsigned int totally_visible_p :1; | 337 unsigned int totally_visible_p :1; |
337 | 338 |
389 #define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_pixmap_background_gc) | 390 #define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_pixmap_background_gc) |
390 #endif /* HAVE_TOOLBARS */ | 391 #endif /* HAVE_TOOLBARS */ |
391 | 392 |
392 #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please) | 393 #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please) |
393 | 394 |
394 #ifdef HAVE_XFT | |
395 #define FRAME_X_XFTDRAW(f) (FRAME_X_DATA (f)->xftDraw) | |
396 #endif | |
397 | |
398 #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p) | 395 #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p) |
399 #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p) | 396 #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p) |
400 | 397 |
401 #ifdef EXTERNAL_WIDGET | 398 #ifdef EXTERNAL_WIDGET |
402 #define FRAME_X_EXTERNAL_WINDOW_P(f) (FRAME_X_DATA (f)->external_window_p) | 399 #define FRAME_X_EXTERNAL_WINDOW_P(f) (FRAME_X_DATA (f)->external_window_p) |