aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-10-05 10:22:08 +0300
committerEli Zaretskii2015-10-05 10:22:08 +0300
commit76d5122a51f6abd98ec8aac16762e7335ab6d31d (patch)
tree51ea939213e425289d9df3ffa0b03591a8b570a3 /src
parent1fa9f860564d1b7f223c73395b77efeab3b48555 (diff)
downloademacs-76d5122a51f6abd98ec8aac16762e7335ab6d31d.tar.gz
emacs-76d5122a51f6abd98ec8aac16762e7335ab6d31d.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 051d3078529..44983bb4f9d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13368,9 +13368,6 @@ redisplay_internal (void)
13368 /* True means redisplay has to redisplay the miniwindow. */ 13368 /* True means redisplay has to redisplay the miniwindow. */
13369 bool update_miniwindow_p = false; 13369 bool update_miniwindow_p = false;
13370 13370
13371 /* True means we need to redraw frames whose 'redisplay' bit is set. */
13372 bool consider_some_frames_p = false;
13373
13374 TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p)); 13371 TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
13375 13372
13376 /* No redisplay if running in batch mode or frame is not yet fully 13373 /* No redisplay if running in batch mode or frame is not yet fully
@@ -13420,8 +13417,6 @@ redisplay_internal (void)
13420 13417
13421 inhibit_free_realized_faces = false; 13418 inhibit_free_realized_faces = false;
13422 13419
13423 consider_some_frames_p = false;
13424
13425 /* If face_change, init_iterator will free all realized faces, which 13420 /* If face_change, init_iterator will free all realized faces, which
13426 includes the faces referenced from current matrices. So, we 13421 includes the faces referenced from current matrices. So, we
13427 can't reuse current matrices in this case. */ 13422 can't reuse current matrices in this case. */
@@ -13592,7 +13587,6 @@ redisplay_internal (void)
13592 && !FRAME_OBSCURED_P (XFRAME (w->frame)) 13587 && !FRAME_OBSCURED_P (XFRAME (w->frame))
13593 && !XFRAME (w->frame)->cursor_type_changed 13588 && !XFRAME (w->frame)->cursor_type_changed
13594 && !XFRAME (w->frame)->face_change 13589 && !XFRAME (w->frame)->face_change
13595 && !XFRAME (w->frame)->redisplay
13596 /* Make sure recorded data applies to current buffer, etc. */ 13590 /* Make sure recorded data applies to current buffer, etc. */
13597 && this_line_buffer == current_buffer 13591 && this_line_buffer == current_buffer
13598 && match_p 13592 && match_p
@@ -13788,31 +13782,14 @@ redisplay_internal (void)
13788#endif 13782#endif
13789 13783
13790 /* Build desired matrices, and update the display. If 13784 /* Build desired matrices, and update the display. If
13791 consider_all_windows_p, do it for all windows on all frames. If 13785 consider_all_windows_p, do it for all windows on all frames that
13792 a frame's 'redisplay' flag is set, do it for all windows on each 13786 require redisplay, as specified by their 'redisplay' flag.
13793 such frame. Otherwise do it for selected_window, only. */ 13787 Otherwise do it for selected_window, only. */
13794
13795 if (!consider_all_windows_p)
13796 {
13797 FOR_EACH_FRAME (tail, frame)
13798 {
13799 if (XFRAME (frame)->redisplay
13800 && XFRAME (frame) != sf
13801 && !FRAME_INITIAL_P (XFRAME (frame)))
13802 {
13803 consider_some_frames_p = true;
13804 break;
13805 }
13806 }
13807 }
13808 13788
13809 if (consider_all_windows_p || consider_some_frames_p) 13789 if (consider_all_windows_p)
13810 { 13790 {
13811 FOR_EACH_FRAME (tail, frame) 13791 FOR_EACH_FRAME (tail, frame)
13812 { 13792 XFRAME (frame)->updated_p = false;
13813 if (XFRAME (frame)->redisplay || consider_all_windows_p)
13814 XFRAME (frame)->updated_p = false;
13815 }
13816 13793
13817 propagate_buffer_redisplay (); 13794 propagate_buffer_redisplay ();
13818 13795
@@ -13826,9 +13803,6 @@ redisplay_internal (void)
13826 && !EQ (FRAME_TTY (f)->top_frame, frame)) 13803 && !EQ (FRAME_TTY (f)->top_frame, frame))
13827 continue; 13804 continue;
13828 13805
13829 if (!consider_all_windows_p && !f->redisplay)
13830 continue;
13831
13832 retry_frame: 13806 retry_frame:
13833 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) 13807 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
13834 { 13808 {
@@ -15474,7 +15448,6 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp,
15474 && !update_mode_lines 15448 && !update_mode_lines
15475 && !windows_or_buffers_changed 15449 && !windows_or_buffers_changed
15476 && !f->cursor_type_changed 15450 && !f->cursor_type_changed
15477 && !f->redisplay
15478 && NILP (Vshow_trailing_whitespace) 15451 && NILP (Vshow_trailing_whitespace)
15479 /* This code is not used for mini-buffer for the sake of the case 15452 /* This code is not used for mini-buffer for the sake of the case
15480 of redisplaying to replace an echo area message; since in 15453 of redisplaying to replace an echo area message; since in
@@ -17085,7 +17058,6 @@ try_window_reusing_current_matrix (struct window *w)
17085 /* Don't try to reuse the display if windows have been split 17058 /* Don't try to reuse the display if windows have been split
17086 or such. */ 17059 or such. */
17087 || windows_or_buffers_changed 17060 || windows_or_buffers_changed
17088 || f->redisplay
17089 || f->cursor_type_changed) 17061 || f->cursor_type_changed)
17090 return false; 17062 return false;
17091 17063
@@ -17863,7 +17835,7 @@ try_window_id (struct window *w)
17863 GIVE_UP (1); 17835 GIVE_UP (1);
17864 17836
17865 /* This flag is used to prevent redisplay optimizations. */ 17837 /* This flag is used to prevent redisplay optimizations. */
17866 if (windows_or_buffers_changed || f->cursor_type_changed || f->redisplay) 17838 if (windows_or_buffers_changed || f->cursor_type_changed)
17867 GIVE_UP (2); 17839 GIVE_UP (2);
17868 17840
17869 /* This function's optimizations cannot be used if overlays have 17841 /* This function's optimizations cannot be used if overlays have