emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Mon, 07 Mar 2005 16:51:51 -0500

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.990 emacs/src/xdisp.c:1.991
*** emacs/src/xdisp.c:1.990     Mon Mar  7 13:43:34 2005
--- emacs/src/xdisp.c   Mon Mar  7 21:51:50 2005
***************
*** 781,786 ****
--- 781,793 ----
  #define CLEAR_FACE_CACHE_COUNT        500
  static int clear_face_cache_count;
  
+ /* Similarly for the image cache.  */
+ 
+ #ifdef HAVE_WINDOW_SYSTEM
+ #define CLEAR_IMAGE_CACHE_COUNT       101
+ static int clear_image_cache_count;
+ #endif
+ 
  /* Record the previous terminal frame we displayed.  */
  
  static struct frame *previous_terminal_frame;
***************
*** 10365,10371 ****
    CHARPOS (this_line_start_pos) = 0;
    consider_all_windows_p |= buffer_shared > 1;
    ++clear_face_cache_count;
! 
  
    /* Build desired matrices, and update the display.  If
       consider_all_windows_p is non-zero, do it for all windows on all
--- 10372,10380 ----
    CHARPOS (this_line_start_pos) = 0;
    consider_all_windows_p |= buffer_shared > 1;
    ++clear_face_cache_count;
! #ifdef HAVE_WINDOW_SYSTEM
!   ++clear_image_cache_count;
! #endif
  
    /* Build desired matrices, and update the display.  If
       consider_all_windows_p is non-zero, do it for all windows on all
***************
*** 10378,10390 ****
        struct frame **updated
        = (struct frame **) alloca (size * sizeof *updated);
  
-       /* Clear the face cache eventually.  */
-       if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
-       {
-         clear_face_cache (0);
-         clear_face_cache_count = 0;
-       }
- 
        /* Recompute # windows showing selected buffer.  This will be
         incremented each time such a window is displayed.  */
        buffer_shared = 0;
--- 10387,10392 ----
***************
*** 10400,10411 ****
                   variables.  */
                select_frame_for_redisplay (frame);
  
- #ifdef HAVE_WINDOW_SYSTEM
-             if (clear_face_cache_count % 50 == 0
-                 && FRAME_WINDOW_P (f))
-               clear_image_cache (f, 0);
- #endif /* HAVE_WINDOW_SYSTEM */
- 
              /* Mark all the scroll bars to be removed; we'll redeem
                 the ones we want when we redisplay their windows.  */
              if (condemn_scroll_bars_hook)
--- 10402,10407 ----
***************
*** 10609,10614 ****
--- 10605,10633 ----
    if (windows_or_buffers_changed && !pause)
      goto retry;
  
+   /* Clear the face cache eventually.  */
+   if (consider_all_windows_p)
+     {
+       if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
+       {
+         clear_face_cache (0);
+         clear_face_cache_count = 0;
+       }
+ #ifdef HAVE_WINDOW_SYSTEM
+       if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT)
+       {
+         Lisp_Object tail, frame;
+         FOR_EACH_FRAME (tail, frame)
+           {
+             struct frame *f = XFRAME (frame);
+             if (FRAME_WINDOW_P (f))
+               clear_image_cache (f, 0);
+           }
+         clear_image_cache_count = 0;
+       }
+ #endif /* HAVE_WINDOW_SYSTEM */
+     }
+ 
   end_of_redisplay:
    unbind_to (count, Qnil);
    RESUME_POLLING;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]