aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Antipov2013-10-08 18:56:15 +0400
committerDmitry Antipov2013-10-08 18:56:15 +0400
commitecab13d4aa458544c604ece77e2ecdf0b9910649 (patch)
tree1a418825805c7ea2011a13483393b9c2c4627103
parentec95982c36b5ac5dcbf13f5e8173caecea74881d (diff)
downloademacs-ecab13d4aa458544c604ece77e2ecdf0b9910649.tar.gz
emacs-ecab13d4aa458544c604ece77e2ecdf0b9910649.zip
* dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
(redraw_frame, update_frame): Adjust users. * dispextern.h (set_window_update_flags): Adjust prototype. * xdisp.c (redisplay_internal): When updating all frames with zero windows_or_buffers_changed, assume that only the windows that shows current buffer should be really updated.
-rw-r--r--src/ChangeLog9
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c15
-rw-r--r--src/xdisp.c9
4 files changed, 25 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 06733a2455f..fc2f7a9d57c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
12013-10-08 Dmitry Antipov <dmantipov@yandex.ru> 12013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
4 (redraw_frame, update_frame): Adjust users.
5 * dispextern.h (set_window_update_flags): Adjust prototype.
6 * xdisp.c (redisplay_internal): When updating all frames with zero
7 windows_or_buffers_changed, assume that only the windows that shows
8 current buffer should be really updated.
9
102013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
11
3 Do not allocate huge temporary memory areas and objects while encoding 12 Do not allocate huge temporary memory areas and objects while encoding
4 for file I/O, thus reducing an enormous memory usage for large buffers. 13 for file I/O, thus reducing an enormous memory usage for large buffers.
5 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html. 14 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
diff --git a/src/dispextern.h b/src/dispextern.h
index 5ddc177bcf0..2f6b730865d 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3460,7 +3460,7 @@ void blank_row (struct window *, struct glyph_row *, int);
3460void clear_glyph_matrix_rows (struct glyph_matrix *, int, int); 3460void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
3461void clear_glyph_row (struct glyph_row *); 3461void clear_glyph_row (struct glyph_row *);
3462void prepare_desired_row (struct glyph_row *); 3462void prepare_desired_row (struct glyph_row *);
3463void set_window_update_flags (struct window *, bool); 3463void set_window_update_flags (struct window *, struct buffer *, bool);
3464void update_single_window (struct window *, bool); 3464void update_single_window (struct window *, bool);
3465void do_pending_window_change (bool); 3465void do_pending_window_change (bool);
3466void change_frame_size (struct frame *, int, int, bool, bool, bool); 3466void change_frame_size (struct frame *, int, int, bool, bool, bool);
diff --git a/src/dispnew.c b/src/dispnew.c
index 27167f4e1e4..8507a330a92 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2910,7 +2910,7 @@ redraw_frame (struct frame *f)
2910 /* Mark all windows as inaccurate, so that every window will have 2910 /* Mark all windows as inaccurate, so that every window will have
2911 its redisplay done. */ 2911 its redisplay done. */
2912 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0); 2912 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
2913 set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), 1); 2913 set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), NULL, 1);
2914 f->garbaged = 0; 2914 f->garbaged = 0;
2915} 2915}
2916 2916
@@ -3041,7 +3041,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
3041 3041
3042 do_pause: 3042 do_pause:
3043 /* Reset flags indicating that a window should be updated. */ 3043 /* Reset flags indicating that a window should be updated. */
3044 set_window_update_flags (root_window, 0); 3044 set_window_update_flags (root_window, NULL, 0);
3045 3045
3046 display_completed = !paused_p; 3046 display_completed = !paused_p;
3047 return paused_p; 3047 return paused_p;
@@ -3820,17 +3820,18 @@ set_window_cursor_after_update (struct window *w)
3820} 3820}
3821 3821
3822 3822
3823/* Set WINDOW->must_be_updated_p to ON_P for all windows in the window 3823/* If B is NULL, set WINDOW->must_be_updated_p to ON_P for all windows in
3824 tree rooted at W. */ 3824 the window tree rooted at W. Otherwise set WINDOW->must_be_updated_p
3825 to ON_P only for windows that displays B. */
3825 3826
3826void 3827void
3827set_window_update_flags (struct window *w, bool on_p) 3828set_window_update_flags (struct window *w, struct buffer *b, bool on_p)
3828{ 3829{
3829 while (w) 3830 while (w)
3830 { 3831 {
3831 if (WINDOWP (w->contents)) 3832 if (WINDOWP (w->contents))
3832 set_window_update_flags (XWINDOW (w->contents), on_p); 3833 set_window_update_flags (XWINDOW (w->contents), b, on_p);
3833 else 3834 else if (!(b && b != XBUFFER (w->contents)))
3834 w->must_be_updated_p = on_p; 3835 w->must_be_updated_p = on_p;
3835 3836
3836 w = NILP (w->next) ? 0 : XWINDOW (w->next); 3837 w = NILP (w->next) ? 0 : XWINDOW (w->next);
diff --git a/src/xdisp.c b/src/xdisp.c
index b01979c3dfd..5d5ce12d096 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13437,8 +13437,13 @@ redisplay_internal (void)
13437 unrequest_sigio (); 13437 unrequest_sigio ();
13438 STOP_POLLING; 13438 STOP_POLLING;
13439 13439
13440 /* Update the display. */ 13440 /* Mark windows on frame F to update. If we decide to
13441 set_window_update_flags (XWINDOW (f->root_window), 1); 13441 update all frames but windows_or_buffers_changed is
13442 zero, we assume that only the windows that shows
13443 current buffer should be really updated. */
13444 set_window_update_flags
13445 (XWINDOW (f->root_window),
13446 (windows_or_buffers_changed ? NULL : current_buffer), 1);
13442 pending |= update_frame (f, 0, 0); 13447 pending |= update_frame (f, 0, 0);
13443 f->cursor_type_changed = 0; 13448 f->cursor_type_changed = 0;
13444 f->updated_p = 1; 13449 f->updated_p = 1;