emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 76d5122: Remove redundant redisplay code


From: Eli Zaretskii
Subject: [Emacs-diffs] master 76d5122: Remove redundant redisplay code
Date: Mon, 05 Oct 2015 07:23:10 +0000

branch: master
commit 76d5122a51f6abd98ec8aac16762e7335ab6d31d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Remove redundant redisplay code
    
    * src/xdisp.c (redisplay_internal, try_cursor_movement)
    (try_window_reusing_current_matrix, try_window_id): Remove
    redundant restrictions on redisplay optimizations based on the
    frame's 'redisplay' flag.  See
    http://osdir.com/ml/general/2015-10/msg02110.html for the relevant
    discussions.
---
 src/xdisp.c |   40 ++++++----------------------------------
 1 files changed, 6 insertions(+), 34 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 051d307..44983bb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13368,9 +13368,6 @@ redisplay_internal (void)
   /* True means redisplay has to redisplay the miniwindow.  */
   bool update_miniwindow_p = false;
 
-  /* True means we need to redraw frames whose 'redisplay' bit is set.  */
-  bool consider_some_frames_p = false;
-
   TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
 
   /* No redisplay if running in batch mode or frame is not yet fully
@@ -13420,8 +13417,6 @@ redisplay_internal (void)
 
   inhibit_free_realized_faces = false;
 
-  consider_some_frames_p = false;
-
   /* If face_change, init_iterator will free all realized faces, which
      includes the faces referenced from current matrices.  So, we
      can't reuse current matrices in this case.  */
@@ -13592,7 +13587,6 @@ redisplay_internal (void)
       && !FRAME_OBSCURED_P (XFRAME (w->frame))
       && !XFRAME (w->frame)->cursor_type_changed
       && !XFRAME (w->frame)->face_change
-      && !XFRAME (w->frame)->redisplay
       /* Make sure recorded data applies to current buffer, etc.  */
       && this_line_buffer == current_buffer
       && match_p
@@ -13788,31 +13782,14 @@ redisplay_internal (void)
 #endif
 
   /* Build desired matrices, and update the display.  If
-     consider_all_windows_p, do it for all windows on all frames.  If
-     a frame's 'redisplay' flag is set, do it for all windows on each
-     such frame.  Otherwise do it for selected_window, only.  */
-
-  if (!consider_all_windows_p)
-    {
-      FOR_EACH_FRAME (tail, frame)
-       {
-         if (XFRAME (frame)->redisplay
-             && XFRAME (frame) != sf
-             && !FRAME_INITIAL_P (XFRAME (frame)))
-           {
-             consider_some_frames_p = true;
-             break;
-           }
-       }
-    }
+     consider_all_windows_p, do it for all windows on all frames that
+     require redisplay, as specified by their 'redisplay' flag.
+     Otherwise do it for selected_window, only.  */
 
-  if (consider_all_windows_p || consider_some_frames_p)
+  if (consider_all_windows_p)
     {
       FOR_EACH_FRAME (tail, frame)
-       {
-         if (XFRAME (frame)->redisplay || consider_all_windows_p)
-           XFRAME (frame)->updated_p = false;
-       }
+       XFRAME (frame)->updated_p = false;
 
       propagate_buffer_redisplay ();
 
@@ -13826,9 +13803,6 @@ redisplay_internal (void)
              && !EQ (FRAME_TTY (f)->top_frame, frame))
            continue;
 
-         if (!consider_all_windows_p && !f->redisplay)
-           continue;
-
        retry_frame:
          if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
            {
@@ -15474,7 +15448,6 @@ try_cursor_movement (Lisp_Object window, struct 
text_pos startp,
       && !update_mode_lines
       && !windows_or_buffers_changed
       && !f->cursor_type_changed
-      && !f->redisplay
       && NILP (Vshow_trailing_whitespace)
       /* This code is not used for mini-buffer for the sake of the case
         of redisplaying to replace an echo area message; since in
@@ -17085,7 +17058,6 @@ try_window_reusing_current_matrix (struct window *w)
       /* Don't try to reuse the display if windows have been split
         or such.  */
       || windows_or_buffers_changed
-      || f->redisplay
       || f->cursor_type_changed)
     return false;
 
@@ -17863,7 +17835,7 @@ try_window_id (struct window *w)
     GIVE_UP (1);
 
   /* This flag is used to prevent redisplay optimizations.  */
-  if (windows_or_buffers_changed || f->cursor_type_changed || f->redisplay)
+  if (windows_or_buffers_changed || f->cursor_type_changed)
     GIVE_UP (2);
 
   /* This function's optimizations cannot be used if overlays have



reply via email to

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