* Excessive redraw of overlapping/overlapped rows?
@ 2005-09-26 8:33 YAMAMOTO Mitsuharu
2005-09-26 14:26 ` Kim F. Storm
0 siblings, 1 reply; 6+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-09-26 8:33 UTC (permalink / raw)
In window_update (dispnew.c), overlapping/overlapped rows are redrawn
if `changed_p' is non-zero.
if (changed_p && rif->fix_overlapping_area)
{
redraw_overlapped_rows (w, yb);
redraw_overlapping_rows (w, yb);
}
but this variable is set when either the mode line or the header line
is updated.
if (mode_line_row->mode_line_p && mode_line_row->enabled_p)
{
mode_line_row->y = yb;
update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
desired_matrix),
&mouse_face_overwritten_p);
changed_p = 1;
}
So when a user moves the cursor vertically and the line number
displayed in the mode line is changed, the whole
overlapping/overlapped rows get redrawn. It significantly degrades
performance of cursor movement for such an environment that text
drawing is not so fast.
Is it OK to not set `changed_p' for the case of mode/header line
updates?
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Excessive redraw of overlapping/overlapped rows?
2005-09-26 8:33 Excessive redraw of overlapping/overlapped rows? YAMAMOTO Mitsuharu
@ 2005-09-26 14:26 ` Kim F. Storm
2005-09-26 19:19 ` David Kastrup
2005-09-27 3:35 ` YAMAMOTO Mitsuharu
0 siblings, 2 replies; 6+ messages in thread
From: Kim F. Storm @ 2005-09-26 14:26 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> Is it OK to not set `changed_p' for the case of mode/header line
> updates?
I don't know for sure , but it seems ok.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Excessive redraw of overlapping/overlapped rows?
2005-09-26 14:26 ` Kim F. Storm
@ 2005-09-26 19:19 ` David Kastrup
2005-09-28 8:25 ` YAMAMOTO Mitsuharu
2006-02-23 10:26 ` YAMAMOTO Mitsuharu
2005-09-27 3:35 ` YAMAMOTO Mitsuharu
1 sibling, 2 replies; 6+ messages in thread
From: David Kastrup @ 2005-09-26 19:19 UTC (permalink / raw)
Cc: YAMAMOTO Mitsuharu, emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
>
>> Is it OK to not set `changed_p' for the case of mode/header line
>> updates?
>
> I don't know for sure , but it seems ok.
If mode line updates change the height of the mode line (because of
descenders, or images or stuff like that), it is conceivable that
something happens with the display, though likely not on all lines at
once. Even for line number updates, if you use line numbers with a
non-constant height (old-style numerals).
So it seems like it would at least appear prudent to check whether the
mode line dimensions changed or something like that, or check just
what lines the mode line might overlap.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Excessive redraw of overlapping/overlapped rows?
2005-09-26 14:26 ` Kim F. Storm
2005-09-26 19:19 ` David Kastrup
@ 2005-09-27 3:35 ` YAMAMOTO Mitsuharu
1 sibling, 0 replies; 6+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-09-27 3:35 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On Mon, 26 Sep 2005 16:26:47 +0200, storm@cua.dk (Kim F. Storm) said:
> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
>> Is it OK to not set `changed_p' for the case of mode/header line
>> updates?
> I don't know for sure , but it seems ok.
Thanks. I'll install the change if I (or someone who tries it) don't
find any problems for a few days.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
Index: src/dispnew.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispnew.c,v
retrieving revision 1.356
diff -c -r1.356 dispnew.c
*** src/dispnew.c 1 Sep 2005 14:16:19 -0000 1.356
--- src/dispnew.c 26 Sep 2005 07:34:48 -0000
***************
*** 4143,4149 ****
update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
desired_matrix),
&mouse_face_overwritten_p);
- changed_p = 1;
}
/* Find first enabled row. Optimizations in redisplay_internal
--- 4143,4148 ----
***************
*** 4213,4219 ****
{
header_line_row->y = 0;
update_window_line (w, 0, &mouse_face_overwritten_p);
- changed_p = 1;
}
/* Fix the appearance of overlapping/overlapped rows. */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Excessive redraw of overlapping/overlapped rows?
2005-09-26 19:19 ` David Kastrup
@ 2005-09-28 8:25 ` YAMAMOTO Mitsuharu
2006-02-23 10:26 ` YAMAMOTO Mitsuharu
1 sibling, 0 replies; 6+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-09-28 8:25 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
>>>>> On Mon, 26 Sep 2005 21:19:32 +0200, David Kastrup <dak@gnu.org> said:
> If mode line updates change the height of the mode line (because of
> descenders, or images or stuff like that), it is conceivable that
> something happens with the display, though likely not on all lines
> at once. Even for line number updates, if you use line numbers with
> a non-constant height (old-style numerals).
So the question would be: can't other parts that set `changed_p' in
update_window() detect such cases? I'm not certain about this
question, but if not, then additional conditions would be needed as
you said.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Excessive redraw of overlapping/overlapped rows?
2005-09-26 19:19 ` David Kastrup
2005-09-28 8:25 ` YAMAMOTO Mitsuharu
@ 2006-02-23 10:26 ` YAMAMOTO Mitsuharu
1 sibling, 0 replies; 6+ messages in thread
From: YAMAMOTO Mitsuharu @ 2006-02-23 10:26 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
>>>>> On Mon, 26 Sep 2005 21:19:32 +0200, David Kastrup <dak@gnu.org> said:
> storm@cua.dk (Kim F. Storm) writes:
>> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
>>
>>> Is it OK to not set `changed_p' for the case of mode/header line
>>> updates?
>>
>> I don't know for sure , but it seems ok.
> If mode line updates change the height of the mode line (because of
> descenders, or images or stuff like that), it is conceivable that
> something happens with the display, though likely not on all lines
> at once. Even for line number updates, if you use line numbers with
> a non-constant height (old-style numerals).
> So it seems like it would at least appear prudent to check whether
> the mode line dimensions changed or something like that, or check
> just what lines the mode line might overlap.
You mean the change like below? But I'm still not certain whether
this kind of mode/header line changes may affect overlapping in other
part of the text area.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
*** dispnew.c.~1.360.~ Thu Feb 23 18:08:35 2006
--- dispnew.c Thu Feb 23 19:17:01 2006
***************
*** 4128,4135 ****
if (force_p || !input_pending || !NILP (do_mouse_tracking))
{
struct glyph_row *row, *end;
! struct glyph_row *mode_line_row;
! struct glyph_row *header_line_row;
int yb, changed_p = 0, mouse_face_overwritten_p = 0, n_updated;
rif->update_window_begin_hook (w);
--- 4128,4135 ----
if (force_p || !input_pending || !NILP (do_mouse_tracking))
{
struct glyph_row *row, *end;
! struct glyph_row *mode_line_row, *current_mode_line_row;
! struct glyph_row *header_line_row, *current_header_line_row;
int yb, changed_p = 0, mouse_face_overwritten_p = 0, n_updated;
rif->update_window_begin_hook (w);
***************
*** 4156,4162 ****
update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
desired_matrix),
&mouse_face_overwritten_p);
! changed_p = 1;
}
/* Find first enabled row. Optimizations in redisplay_internal
--- 4156,4166 ----
update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
desired_matrix),
&mouse_face_overwritten_p);
! current_mode_line_row = MATRIX_MODE_LINE_ROW (w->current_matrix);
! if (!(current_mode_line_row->mode_line_p
! && current_mode_line_row->enabled_p
! && mode_line_row->height == current_mode_line_row->height))
! changed_p = 1;
}
/* Find first enabled row. Optimizations in redisplay_internal
***************
*** 4226,4232 ****
{
header_line_row->y = 0;
update_window_line (w, 0, &mouse_face_overwritten_p);
! changed_p = 1;
}
/* Fix the appearance of overlapping/overlapped rows. */
--- 4230,4240 ----
{
header_line_row->y = 0;
update_window_line (w, 0, &mouse_face_overwritten_p);
! current_header_line_row = w->current_matrix->rows;
! if (!(current_header_line_row->mode_line_p
! && current_header_line_row->enabled_p
! && header_line_row->height == current_header_line_row->height))
! changed_p = 1;
}
/* Fix the appearance of overlapping/overlapped rows. */
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-02-23 10:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-26 8:33 Excessive redraw of overlapping/overlapped rows? YAMAMOTO Mitsuharu
2005-09-26 14:26 ` Kim F. Storm
2005-09-26 19:19 ` David Kastrup
2005-09-28 8:25 ` YAMAMOTO Mitsuharu
2006-02-23 10:26 ` YAMAMOTO Mitsuharu
2005-09-27 3:35 ` YAMAMOTO Mitsuharu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.