GNU bug report logs - #11484
23.4; Scrolling leaves traces of old text behind

Previous Next

Packages: ns, emacs;

Reported by: Frank Marcoline <fvmarcoline <at> gmail.com>

Date: Tue, 15 May 2012 22:13:02 UTC

Severity: normal

Found in version 23.4

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11484 in the body.
You can then email your comments to 11484 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs. (Tue, 15 May 2012 22:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frank Marcoline <fvmarcoline <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 15 May 2012 22:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Frank Marcoline <fvmarcoline <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4; Scrolling leaves traces of old text behind
Date: Tue, 15 May 2012 15:02:01 -0700
[Message part 1 (text/plain, inline)]
Bug:  Scrolling can leave behind traces of old text.
The traces appear to be cyan outlines of the right hand
side of characters which previously occupied the same location.

For example, a "Y" will leave behind a small cyan dot from its upper
right, an "A" will leave behind a small cyan dot from its lower right.

Steps to reproduce:

1)  /Applications/Emacs.app/Contents/MacOS/Emacs -Q
2)  C-x C-f helix.pqr [Ret]
3)  Rapidly scroll up and down with two-finger drag gesture

I have attached the file helix.pqr, for which the effect is
very pronounced, and a screenshot faithfully reproducing
the effect.  Note the small cyan marks on the left of
many numbers and letters.

This version of emacs came from http://emacsformacosx.com/

In GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2012-01-29 on bob.porkrind.org
Windowing system distributor `Apple', version 10.3.1138
configured using `configure  '--host=x86_64-apple-darwin'
'--build=i686-apple-darwin' '--with-ns'
'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin'
'CC=gcc -mmacosx-version-min=10.5''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up>
<wheel-up> <double-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <wheel-down>
<double-wheel-down> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-up> <double-wheel-up> <wheel-down>
<wheel-down> <double-wheel-down> <wheel-up> <wheel-down>
<wheel-down> <wheel-up> <double-wheel-up> <wheel-up>
<wheel-up> <double-wheel-up> <triple-wheel-up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> C-x b <return>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <wheel-up> <double-wheel-up> <wheel-down>
<double-wheel-down> <triple-wheel-down> <wheel-down>
<double-wheel-down> <triple-wheel-down> <wheel-up>
<double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <wheel-up>
<double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<wheel-up> <double-wheel-up> <triple-wheel-up> <wheel-down>
<double-wheel-down> <wheel-down> <double-wheel-down>
M-x b u g <tab> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> r e p <tab> o r <tab> <return>

Recent messages:
Saving file /Users/fvm/.emacs...
Wrote /Users/fvm/.emacs
byte-code: Beginning of buffer [8 times]
byte-code: End of buffer [13 times]
byte-code: Beginning of buffer [13 times]
byte-code: End of buffer [26 times]
byte-code: Beginning of buffer [14 times]
byte-code: End of buffer [2 times]
Making completion list...
byte-code: End of buffer [4 times]

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug help-mode view vc-hg cc-mode
cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
easymenu tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process ns multi-tty emacs)
[helix.pqr (application/octet-stream, attachment)]
[Screen Shot 2012-05-15 at 2.54.44 PM.png (image/png, attachment)]

Reply sent to Jan Djärv <jan.h.d <at> swipnet.se>:
You have taken responsibility. (Sun, 21 Oct 2012 19:10:01 GMT) Full text and rfc822 format available.

Notification sent to Frank Marcoline <fvmarcoline <at> gmail.com>:
bug acknowledged by developer. (Sun, 21 Oct 2012 19:10:02 GMT) Full text and rfc822 format available.

Message #10 received at 11484-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Frank Marcoline <fvmarcoline <at> gmail.com>
Cc: 11484-done <at> debbugs.gnu.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Sun, 21 Oct 2012 21:07:11 +0200
[Message part 1 (text/plain, inline)]
Hello.

I have fixed this in the trunk, but I'm not satisfied with the solution, but it will have to do for now.
The problem has to do with LCD-smoothing.  As you can see in the attached picture


one pixel of the A in the lower right corner extends in to the box for T.  As Emacs does not know about these pixels, when we write a Y over the A, the pixel remains.
You can see the same effect when Y is replaced with for example A.  The top right part of the Y has an extra pixel in the next character box, that remains.

The current solution is to turn off LCD-smoothing.  A better solution would be to draw the whole line every time.  Or somehow keep track of adjacent characters that needs to be redrawn.  But that may involve the display engine and is a bigger task.

	Jan D.



16 maj 2012 kl. 00:02 skrev Frank Marcoline <fvmarcoline <at> gmail.com>:

> Bug:  Scrolling can leave behind traces of old text.
> The traces appear to be cyan outlines of the right hand
> side of characters which previously occupied the same location.
> 
> For example, a "Y" will leave behind a small cyan dot from its upper
> right, an "A" will leave behind a small cyan dot from its lower right.
> 
> Steps to reproduce:
> 
> 1)  /Applications/Emacs.app/Contents/MacOS/Emacs -Q
> 2)  C-x C-f helix.pqr [Ret]
> 3)  Rapidly scroll up and down with two-finger drag gesture
> 
> I have attached the file helix.pqr, for which the effect is
> very pronounced, and a screenshot faithfully reproducing
> the effect.  Note the small cyan marks on the left of
> many numbers and letters.
> 
> This version of emacs came from http://emacsformacosx.com/
> 
> In GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
> of 2012-01-29 on bob.porkrind.org
> Windowing system distributor `Apple', version 10.3.1138
> configured using `configure  '--host=x86_64-apple-darwin'
> '--build=i686-apple-darwin' '--with-ns'
> 'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin'
> 'CC=gcc -mmacosx-version-min=10.5''
> 
> Important settings:
>  value of $LC_ALL: nil
>  value of $LC_COLLATE: nil
>  value of $LC_CTYPE: nil
>  value of $LC_MESSAGES: nil
>  value of $LC_MONETARY: nil
>  value of $LC_NUMERIC: nil
>  value of $LC_TIME: nil
>  value of $LANG: en_US.UTF-8
>  value of $XMODIFIERS: nil
>  locale-coding-system: utf-8-unix
>  default enable-multibyte-characters: t
> 
> Major mode: Fundamental
> 
> Minor modes in effect:
>  tooltip-mode: t
>  mouse-wheel-mode: t
>  menu-bar-mode: t
>  file-name-shadow-mode: t
>  global-font-lock-mode: t
>  font-lock-mode: t
>  blink-cursor-mode: t
>  auto-encryption-mode: t
>  auto-compression-mode: t
>  line-number-mode: t
>  transient-mark-mode: t
> 
> Recent input:
> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up>
> <wheel-up> <double-wheel-up> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <wheel-down>
> <double-wheel-down> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <wheel-up> <double-wheel-up> <wheel-down>
> <wheel-down> <double-wheel-down> <wheel-up> <wheel-down>
> <wheel-down> <wheel-up> <double-wheel-up> <wheel-up>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> C-x b <return>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <wheel-down> <double-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <wheel-up> <double-wheel-up> <wheel-down>
> <double-wheel-down> <triple-wheel-down> <wheel-down>
> <double-wheel-down> <triple-wheel-down> <wheel-up>
> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <wheel-down> <double-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <wheel-up>
> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <wheel-down> <double-wheel-down> <triple-wheel-down>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <wheel-down>
> <double-wheel-down> <wheel-down> <double-wheel-down>
> M-x b u g <tab> <backspace> <backspace> <backspace>
> <backspace> <backspace> <backspace> <backspace> <backspace>
> <backspace> <backspace> <backspace> <backspace> <backspace>
> <backspace> r e p <tab> o r <tab> <return>
> 
> Recent messages:
> Saving file /Users/fvm/.emacs...
> Wrote /Users/fvm/.emacs
> byte-code: Beginning of buffer [8 times]
> byte-code: End of buffer [13 times]
> byte-code: Beginning of buffer [13 times]
> byte-code: End of buffer [26 times]
> byte-code: Beginning of buffer [14 times]
> byte-code: End of buffer [2 times]
> Making completion list...
> byte-code: End of buffer [4 times]
> 
> Load-path shadows:
> None found.
> 
> Features:
> (shadow sort mail-extr message ecomplete rfc822 mml mml-sec
> password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
> rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
> time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
> hex-util hashcash mail-utils emacsbug help-mode view vc-hg cc-mode
> cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
> regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
> easymenu tool-bar dnd fontset image fringe lisp-mode register page
> menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
> font-lock syntax facemenu font-core frame cham georgian utf-8-lang
> misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
> greek romanian slovak czech european ethiopic indian cyrillic chinese
> case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
> minibuffer faces cus-face files text-properties overlay md5 base64
> format env code-pages mule custom widget hashtable-print-readable
> backquote make-network-process ns multi-tty emacs)
> <helix.pqr><Screen Shot 2012-05-15 at 2.54.44 PM.png>

[Message part 2 (text/html, inline)]
[Skärmavbild 2012-10-21 kl. 21.00.06.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Sun, 21 Oct 2012 19:59:02 GMT) Full text and rfc822 format available.

Message #13 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 11484 <at> debbugs.gnu.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Sun, 21 Oct 2012 21:56:58 +0200
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Sun, 21 Oct 2012 21:07:11 +0200
> Cc: 11484-done <at> debbugs.gnu.org
> 
> The current solution is to turn off LCD-smoothing.  A better
> solution would be to draw the whole line every time.

What do you mean by "redrawing the whole line", and how would that be
different from what was redrawn in the recipe for this bug?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 05:10:01 GMT) Full text and rfc822 format available.

Message #16 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11484 <at> debbugs.gnu.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Mon, 22 Oct 2012 07:07:33 +0200
Hello.

21 okt 2012 kl. 21:56 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Sun, 21 Oct 2012 21:07:11 +0200
>> Cc: 11484-done <at> debbugs.gnu.org
>> 
>> The current solution is to turn off LCD-smoothing.  A better
>> solution would be to draw the whole line every time.
> 
> What do you mean by "redrawing the whole line", and how would that be
> different from what was redrawn in the recipe for this bug?

In the file helix.pqr, there are columns of A:s followed by space.  When scrolling fast (or sometimes just going to the end of the buffer), the A:s are replaced with Y:s.  But the spacees following the A:s are not redrawn.  I assume the display engine correctly assumes that from a character view they have not changed and need not be redrawn.  But that extra pixel in A:s lower right corner is in the box for the space.  Redrawing the whole line in this case would also redraw the space.

That isn't a very good solution now that I think about it, as it would require a redraw of the whole line just to draw the cursor.  A more efficient way would be to include the previous unchanged character and the following unchanged character when redrawing a block of changed characters.

So redrawing the cursor for example would involve redrawing three characters.

	Jan D.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 05:14:01 GMT) Full text and rfc822 format available.

Message #19 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 11484 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Sun, 21 Oct 2012 22:11:36 -0700
[Message part 1 (text/plain, inline)]
On 10/21/2012 10:07 PM, Jan Djärv wrote:
> That isn't a very good solution now that I think about it, as it would
> require
a redraw of the whole line just to draw the cursor.

Are displays still slow enough that we have to care about graphics optimization
at this level? Any OS X system is compositing the whole window anyway. My sense
is that we could redraw the whole frame on every update without anyone noticing
a performance difference --- except over remote X11.

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 13:22:02 GMT) Full text and rfc822 format available.

Message #22 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 11484 <at> debbugs.gnu.org, Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Mon, 22 Oct 2012 09:19:27 -0400
>> That isn't a very good solution now that I think about it, as it would
>> require
> A redraw of the whole line just to draw the cursor.
> Are displays still slow enough that we have to care about graphics
> optimization at this level?

Sadly, in my experience, yes: with an E350 fusion processor running X11
and using server-side fonts, the drawing operations are sufficiently
slow that I can see that the frame is drawn top-to-bottom, so yes a full
redraw is very much visible.

IIUC the Xorg guys justify this by saying that these operations "never
happen" nowadays and that speeding them up would have to be at the
detriment of the more common operations.

If someone knows how to get misc-fixed-semicondensed-13 using xft
(i.e. client-side fonts), I'm all ears.


        Stefan


PS: BTW, I'm not sure if redrawing one more char on each side would
help, because depending on how the redraw is done, it might just push
the problem one char further.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 15:11:02 GMT) Full text and rfc822 format available.

Message #25 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Kenichi Handa <handa <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 11484 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Tue, 23 Oct 2012 00:06:46 +0900
In article <jwvzk3ebqs3.fsf-monnier+emacs <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> If someone knows how to get misc-fixed-semicondensed-13 using xft
> (i.e. client-side fonts), I'm all ears.

At first, enable bitmap font in fontconfig (on Ubuntu, this
is done by deleting /etc/fonts/conf.d/70-no-bitmaps.conf).
Then copy PCF files of misc-fixed-semicondensed-13 fonts to
~/.fonts.
Now Emacs should be able to use those PCF fonts via XFT.

---
Kenichi Handa
handa <at> gnu.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 17:30:02 GMT) Full text and rfc822 format available.

Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Achim Gratz <Stromeko <at> nexgo.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Mon, 22 Oct 2012 19:27:07 +0200
Daniel Colascione writes:
> Are displays still slow enough that we have to care about graphics optimization
> at this level?

Yes, at least for certain combinations of X server and graphics card
driver.  Also, the combination of Emacs and Gtk+ seems to trigger a
codepath in the display driver that is especially slow, even more so if
scroll-bars are switched on.  On my RV350-based AGP card this makes
Emacs' display updates about 80x slower than usual and I can assure you
that this is very noticeable (and annoying).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 17:32:02 GMT) Full text and rfc822 format available.

Message #31 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 11484 <at> debbugs.gnu.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Mon, 22 Oct 2012 19:29:30 +0200
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Mon, 22 Oct 2012 07:07:33 +0200
> Cc: 11484 <at> debbugs.gnu.org
> 
> In the file helix.pqr, there are columns of A:s followed by space.  When scrolling fast (or sometimes just going to the end of the buffer), the A:s are replaced with Y:s.  But the spacees following the A:s are not redrawn.  I assume the display engine correctly assumes that from a character view they have not changed and need not be redrawn.  But that extra pixel in A:s lower right corner is in the box for the space.  Redrawing the whole line in this case would also redraw the space.
> 
> That isn't a very good solution now that I think about it, as it would require a redraw of the whole line just to draw the cursor.  A more efficient way would be to include the previous unchanged character and the following unchanged character when redrawing a block of changed characters.

You may wish taking a look at dispnew.c:update_text_area.  This
function is called for every glyph row (= screen line) we may need to
redraw, and it tries to minimize the parts of the line that are
actually redrawn.  I would first try disabling this optimization,
forcing the function to always redraw each line, as it normally does
under the following conditions:

  /* If rows are at different X or Y, or rows have different height,
     or the current row is marked invalid, write the entire line.  */
  if (!current_row->enabled_p
      || desired_row->y != current_row->y
      || desired_row->ascent != current_row->ascent
      || desired_row->phys_ascent != current_row->phys_ascent
      || desired_row->phys_height != current_row->phys_height
      || desired_row->visible_height != current_row->visible_height
      || current_row->overlapped_p
      /* This next line is necessary for correctly redrawing
	 mouse-face areas after scrolling and other operations.
	 However, it causes excessive flickering when mouse is moved
	 across the mode line.  Luckily, turning it off for the mode
	 line doesn't seem to hurt anything. -- cyd.
         But it is still needed for the header line. -- kfs.  */
      || (current_row->mouse_face_p
	  && !(current_row->mode_line_p && vpos > 0))
      || current_row->x != desired_row->x)
    {
      rif->cursor_to (vpos, 0, desired_row->y, desired_row->x);

      if (desired_row->used[TEXT_AREA])
	rif->write_glyphs (desired_row->glyphs[TEXT_AREA],
			   desired_row->used[TEXT_AREA]);

If this indeed shows you are on the right track, try changing the
'else' branch of this 'if' so that it redraws a larger part of the
line, as needed in this case.  There's already some logic there
towards this end, which has to do with glyph overlaps, so maybe just a
small change to that will fix this case.

Or maybe NS needs some change in xdisp.c:x_get_glyph_overhangs, which
is what update_text_area calls to determine whether a glyph overlaps
its neighbor.

HTH





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Mon, 22 Oct 2012 17:36:02 GMT) Full text and rfc822 format available.

Message #34 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 11484 <at> debbugs.gnu.org, jan.h.d <at> swipnet.se
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Mon, 22 Oct 2012 19:33:29 +0200
> Date: Sun, 21 Oct 2012 22:11:36 -0700
> From: Daniel Colascione <dancol <at> dancol.org>
> CC: Eli Zaretskii <eliz <at> gnu.org>, 11484 <at> debbugs.gnu.org
> 
> Are displays still slow enough that we have to care about graphics optimization
> at this level?

As Stefan points out, yes, even on X11.

There's also another annoying result of frequent full redrawing:
flickering.  I suspect that disabling this optimization will have the
effect that leaning on the left or right arrow key would cause the
line with the cursor flicker due to constant redrawing.  Similar
problems will show up with the mode line, which is updated quite
frequently.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Tue, 23 Oct 2012 01:25:02 GMT) Full text and rfc822 format available.

Message #37 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kenichi Handa <handa <at> gnu.org>
Cc: 11484 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Mon, 22 Oct 2012 21:22:29 -0400
>> If someone knows how to get misc-fixed-semicondensed-13 using xft
>> (i.e. client-side fonts), I'm all ears.
> At first, enable bitmap font in fontconfig (on Ubuntu, this
> is done by deleting /etc/fonts/conf.d/70-no-bitmaps.conf).

Indeed, that worked, thanks (tho the performance wasn't noticeably
better).

> Then copy PCF files of misc-fixed-semicondensed-13 fonts to ~/.fonts.

I didn't need to do that for the font I use (running Debian, here).

> Now Emacs should be able to use those PCF fonts via XFT.

It actually crashed with an assertion violation because a font `spec'
was nil where a vector was expected.  I used the quick-fix below which
appeared to work, but without knowing what it implies.  Can you take
a look and help me figure out what the right fix should be?


        Stefan


=== modified file 'src/frame.c'
--- src/frame.c	2012-10-20 21:30:51 +0000
+++ src/frame.c	2012-10-23 01:11:11 +0000
@@ -3242,7 +3242,7 @@
 	  Lisp_Object ascii_font = fontset_ascii (fontset);
 	  Lisp_Object spec = font_spec_from_name (ascii_font);
 
-	  if (! font_match_p (spec, font_object))
+	  if (NILP (spec) || ! font_match_p (spec, font_object))
 	    fontset = -1;
 	}
     }





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Tue, 23 Oct 2012 04:55:02 GMT) Full text and rfc822 format available.

Message #40 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Kenichi Handa <handa <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 11484 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Tue, 23 Oct 2012 13:50:24 +0900
In article <jwva9ve9e93.fsf-monnier+emacs <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> > Now Emacs should be able to use those PCF fonts via XFT.

> It actually crashed with an assertion violation because a font `spec'
> was nil where a vector was expected.

It means font_spec_from_name failed, which means
font_parse_name failed.  But, I didn't get that crach.
Please find what font name is given to font_parse_name, and
why it fails with that name.

> I used the quick-fix below which
> appeared to work, but without knowing what it implies.  Can you take
> a look and help me figure out what the right fix should be?

I think the better way is to do something like this:

  if (NILP (spec))
    signal_error ("Invalid font name", ascii_font);

---
Kenichi Handa
handa <at> gnu.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11484; Package emacs,ns. (Tue, 23 Oct 2012 13:02:02 GMT) Full text and rfc822 format available.

Message #43 received at 11484 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kenichi Handa <handa <at> gnu.org>
Cc: 11484 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind
Date: Tue, 23 Oct 2012 08:59:35 -0400
> I think the better way is to do something like this:
>   if (NILP (spec))
>     signal_error ("Invalid font name", ascii_font);

OK, that makes sense, it gives me:

Debugger entered--Lisp error: (error "Invalid font name" "-Misc-Fixed-normal-normal-semi-condensed-*-13-*-*-*-c-60-iso10646-1")

but I have no idea where this "semi-condensed" comes from.  The full
backtrace shows that it was generated "internally".  My guess is that
xft returns a font info where the width says "semi-condensed", so "turn
it into an XFD and parse it back" ends up failing.


        Stefan


Debugger entered--Lisp error: (error "Invalid font name" "-Misc-Fixed-normal-normal-semi-condensed-*-13-*-*-*-c-60-iso10646-1")
  internal-set-lisp-face-attribute(default :width normal #<frame emacs <at> pastel 0x8a52c10>)
  set-face-attribute(default #<frame emacs <at> pastel 0x8a52c10> :width normal :weight normal :slant normal :font "-misc-fixed-*-r-semicondensed-*-13-*-*-*-*-*-*-*")
  font-setting-change-default-font(":0.0" nil)
  dynamic-setting-handle-config-changed-event((config-changed-event font-render ":0.0"))
  call-interactively(dynamic-setting-handle-config-changed-event nil [(config-changed-event font-render ":0.0")])




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Nov 2012 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.