diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-02-22 17:42:09 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-02-22 17:42:09 +0000 |
commit | 354884c46ee708a22b0372d2092256408b485c8d (patch) | |
tree | 03802c0c4e44d3ecd4b096cada74b8abf811ce29 /src/alloc.c | |
parent | c2e426903cfd93202e302471a6e1b265a08e8368 (diff) | |
download | emacs-354884c46ee708a22b0372d2092256408b485c8d.tar.gz |
Consolidate the image_cache to the terminal struct.
* termhooks.h (P_): Remove redundant def.
(struct terminal): New field `image_cache'.
* frame.h (FRAME_IMAGE_CACHE): New macro. Use it everywhere in place
of FRAME_X_IMAGE_CACHE.
* xterm.h (struct x_display_info): Remove image_cache field.
(FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
* w32term.h (struct w32_display_info): Remove image_cache field.
(FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
* macterm.h (struct mac_display_info): Remove image_cache field.
(FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
* xterm.c (x_term_init):
* w32term.c (w32_term_init):
* macterm.c (mac_term_init): Set the image_cache in the terminal.
* dispextern.h (clear_image_cache, forall_images_in_image_cache):
Remove declarations.
(clear_image_caches, mark_image_cache): New declarations.
* xfaces.c (clear_face_cache):
* xdisp.c (redisplay_internal): Use clear_image_caches.
* image.c (clear_image_cache): Don't check that a frame is on
a window-system before checking if it shares the same cache.
(clear_image_caches): New function.
(Fclear_image_cache): Use it.
(mark_image): Move from allo.c.
(mark_image_cache): Move from alloc.c and forall_images_in_image_cache.
* alloc.c (mark_image, mark_image_cache): Move to image.c.
(mark_object): Don't call mark_image_cache for frames.
(mark_terminals): Call mark_image_cache.
Diffstat (limited to 'src/alloc.c')
-rw-r--r-- | src/alloc.c | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/src/alloc.c b/src/alloc.c index 68fc5d9d2a7..fe37eec9379 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -353,8 +353,6 @@ static void mark_face_cache P_ ((struct face_cache *)); #ifdef HAVE_WINDOW_SYSTEM extern void mark_fringe_data P_ ((void)); -static void mark_image P_ ((struct image *)); -static void mark_image_cache P_ ((struct frame *)); #endif /* HAVE_WINDOW_SYSTEM */ static struct Lisp_String *allocate_string P_ ((void)); @@ -5324,34 +5322,6 @@ mark_face_cache (c) } -#ifdef HAVE_WINDOW_SYSTEM - -/* Mark Lisp objects in image IMG. */ - -static void -mark_image (img) - struct image *img; -{ - mark_object (img->spec); - - if (!NILP (img->data.lisp_val)) - mark_object (img->data.lisp_val); -} - - -/* Mark Lisp objects in image cache of frame F. It's done this way so - that we don't have to include xterm.h here. */ - -static void -mark_image_cache (f) - struct frame *f; -{ - forall_images_in_image_cache (f, mark_image); -} - -#endif /* HAVE_X_WINDOWS */ - - /* Mark reference to a Lisp_Object. If the object referred to has not been seen yet, recursively mark @@ -5520,12 +5490,7 @@ mark_object (arg) { register struct frame *ptr = XFRAME (obj); if (mark_vectorlike (XVECTOR (obj))) - { - mark_face_cache (ptr->face_cache); -#ifdef HAVE_WINDOW_SYSTEM - mark_image_cache (ptr); -#endif /* HAVE_WINDOW_SYSTEM */ - } + mark_face_cache (ptr->face_cache); } else if (WINDOWP (obj)) { @@ -5760,6 +5725,9 @@ mark_terminals (void) for (t = terminal_list; t; t = t->next_terminal) { eassert (t->name != NULL); +#ifdef HAVE_WINDOW_SYSTEM + mark_image_cache (t->image_cache); +#endif /* HAVE_WINDOW_SYSTEM */ mark_vectorlike ((struct Lisp_Vector *)t); } } |