diff src/dispextern.h @ 92150:1c088baa9d2d

Allow fine-grained image-cache flushing. * dispextern.h (struct image): Add `dependencies' field. (clear_image_caches): Change arg to Lisp_Object. * image.c (make_image): Initialize `dependencies' field. (clear_image_cache): Change arg to allow fine-grained flushing. Perform the flush even if image-cache-eviction-delay is nil. (clear_image_caches): Change arg to Lisp_Object. (Fclear_image_cache): Expand meaning of the argument. (mark_image): Mark `dependencies' field. * xfaces.c (clear_face_cache): Adapt arg to call to clear_image_caches. (lface_hash): Use XHASH rather than XFASTINT. (face_at_buffer_position): Fix int -> EMACS_INT position. * xdisp.c (next_overlay_change): Fix int -> EMACS_INT position. (select_frame_for_redisplay): Remove code duplication. (redisplay_internal): Adapt arg to call to clear_image_caches.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 24 Feb 2008 13:36:39 +0000
parents 4d9fc08769fa
children 579a729e2f9f
line wrap: on
line diff
--- a/src/dispextern.h	Sun Feb 24 13:24:12 2008 +0000
+++ b/src/dispextern.h	Sun Feb 24 13:36:39 2008 +0000
@@ -2487,6 +2487,11 @@
   /* Lisp specification of this image.  */
   Lisp_Object spec;
 
+  /* List of "references" followed to build the image.
+     Typically will just contain the name of the image file.
+     Used to allow fine-grained cache flushing.  */
+  Lisp_Object dependencies;
+
   /* Relief to draw around the image.  */
   int relief;
 
@@ -2818,7 +2823,7 @@
 void x_kill_gs_process P_ ((Pixmap, struct frame *));
 struct image_cache *make_image_cache P_ ((void));
 void free_image_cache P_ ((struct frame *));
-void clear_image_caches P_ ((int));
+void clear_image_caches P_ ((Lisp_Object));
 void mark_image_cache P_ ((struct image_cache *));
 int valid_image_p P_ ((Lisp_Object));
 void prepare_image_for_display P_ ((struct frame *, struct image *));