emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114580: * dispnew.c (set_window_update_flags): Add


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r114580: * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
Date: Tue, 08 Oct 2013 14:57:04 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114580
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2013-10-08 18:56:15 +0400
message:
  * 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.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/dispnew.c                  dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-10-08 06:40:09 +0000
+++ b/src/ChangeLog     2013-10-08 14:56:15 +0000
@@ -1,5 +1,14 @@
 2013-10-08  Dmitry Antipov  <address@hidden>
 
+       * 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.
+
+2013-10-08  Dmitry Antipov  <address@hidden>
+
        Do not allocate huge temporary memory areas and objects while encoding
        for file I/O, thus reducing an enormous memory usage for large buffers.
        See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-09-24 05:42:30 +0000
+++ b/src/dispextern.h  2013-10-08 14:56:15 +0000
@@ -3460,7 +3460,7 @@
 void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
 void clear_glyph_row (struct glyph_row *);
 void prepare_desired_row (struct glyph_row *);
-void set_window_update_flags (struct window *, bool);
+void set_window_update_flags (struct window *, struct buffer *, bool);
 void update_single_window (struct window *, bool);
 void do_pending_window_change (bool);
 void change_frame_size (struct frame *, int, int, bool, bool, bool);

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2013-09-24 15:29:27 +0000
+++ b/src/dispnew.c     2013-10-08 14:56:15 +0000
@@ -2910,7 +2910,7 @@
   /* Mark all windows as inaccurate, so that every window will have
      its redisplay done.  */
   mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
-  set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), 1);
+  set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), NULL, 1);
   f->garbaged = 0;
 }
 
@@ -3041,7 +3041,7 @@
 
  do_pause:
   /* Reset flags indicating that a window should be updated.  */
-  set_window_update_flags (root_window, 0);
+  set_window_update_flags (root_window, NULL, 0);
 
   display_completed = !paused_p;
   return paused_p;
@@ -3820,17 +3820,18 @@
 }
 
 
-/* Set WINDOW->must_be_updated_p to ON_P for all windows in the window
-   tree rooted at W.  */
+/* If B is NULL, set WINDOW->must_be_updated_p to ON_P for all windows in
+   the window tree rooted at W.  Otherwise set WINDOW->must_be_updated_p
+   to ON_P only for windows that displays B.  */
 
 void
-set_window_update_flags (struct window *w, bool on_p)
+set_window_update_flags (struct window *w, struct buffer *b, bool on_p)
 {
   while (w)
     {
       if (WINDOWP (w->contents))
-       set_window_update_flags (XWINDOW (w->contents), on_p);
-      else
+       set_window_update_flags (XWINDOW (w->contents), b, on_p);
+      else if (!(b && b != XBUFFER (w->contents)))
        w->must_be_updated_p = on_p;
 
       w = NILP (w->next) ? 0 : XWINDOW (w->next);

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-10-07 15:11:17 +0000
+++ b/src/xdisp.c       2013-10-08 14:56:15 +0000
@@ -13437,8 +13437,13 @@
                    unrequest_sigio ();
                  STOP_POLLING;
 
-                 /* Update the display.  */
-                 set_window_update_flags (XWINDOW (f->root_window), 1);
+                 /* Mark windows on frame F to update.  If we decide to
+                    update all frames but windows_or_buffers_changed is
+                    zero, we assume that only the windows that shows
+                    current buffer should be really updated.  */
+                 set_window_update_flags
+                   (XWINDOW (f->root_window),
+                    (windows_or_buffers_changed ? NULL : current_buffer), 1);
                  pending |= update_frame (f, 0, 0);
                  f->cursor_type_changed = 0;
                  f->updated_p = 1;


reply via email to

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