unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: konrad.podczeck@univie.ac.at, 42406@debbugs.gnu.org
Subject: bug#42406: Mouse-wheel scrolling can be flickering
Date: Mon, 14 Dec 2020 20:25:30 +0000	[thread overview]
Message-ID: <X9fKOgXkHCiAQx57@breton.holly.idiocy.org> (raw)
In-Reply-To: <837dpkcqpa.fsf@gnu.org>

On Mon, Dec 14, 2020 at 06:12:01PM +0200, Eli Zaretskii wrote:
> We need to update the mode lines due to scrolling, because mode lines
> show the buffer position and other related info.  And please keep in
> mind that the frame title can use almost any %-construct defined for
> the mode line, so we may need to recompute it as well, when we scroll.
> And there's no mechanism in redisplay to redraw portions of the frame
> (i.e. something that doesn't belong to any window) except by setting
> consider_all_windows_p non-zero.  The effect of that is to consider
> all the windows on all the frames for redisplay.  But while Emacs can
> refrain from actually redrawing on the glass the parts that it
> controls (text displayed in the window etc.), it cannot refrain from
> redrawing the parts that are under the control of the GUI toolkit or
> the VW.  Which is why you see some portions of the frame flicker.
> 
> IOW, the flickering in this case is expected, and cannot be avoided
> without making the display engine more fine-grained wrt which parts
> need redrawing and when.  The usual method of avoiding flickering is
> by double-buffering, but that isn't supported on NS, is it?
> 
> However, this bug report said that scrolling becomes slower and slower
> with time, and that is not expected, and I see no direct relation
> between that and flickering.  Can we please go back to that aspect of
> the problem?  It shouldn't happen.

I don't see any flickering. I only see the performance reduction when
multiple frames are open.

That happens because drawing to the glass is slow, and the more we
draw to the screen, the longer it takes. When scrolling frame A, frame
B (and C, and D, etc., etc.) has its internal border and cursor(s)
redrawn.

If we MUST redraw these when nothing on the frame is to be updated,
then I don't see there's very much we can do. I've spent a lot of time
trying to improve performance of drawing to the screen and I don't
have the knowledge required to improve it any further.

I think our only next step is to move to hardware acceleration, but
that's not available on a Free system, afaict, so is banned, and I
don't know how to go about doing that anyway.

For the record: redrawing the internal border will cause all versions
of the NS port to redraw the entire frame, because Cocoa only allows
you to select rectangles to redraw, and it joins any contiguous
rectangles together into bigger rectangles, and the internal border
forms a rectangle containing the entire frame contents.

Perhaps I should get rid of the internal border code, it's new to the
NS port in Emacs 28.

-- 
Alan Third





  reply	other threads:[~2020-12-14 20:25 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 15:36 bug#42406: Mouse-wheel scrolling can be flickering Konrad Podczeck
2020-07-19 13:33 ` Alan Third
2020-07-19 20:29   ` Konrad Podczeck
2020-07-22 20:16     ` Alan Third
2020-07-30 10:30       ` Konrad Podczeck
2020-08-01 13:12         ` Alan Third
2020-10-10  9:51         ` Alan Third
2020-10-10 14:07           ` Konrad Podczeck
2020-12-10 17:14             ` Konrad Podczeck
2020-12-10 22:10               ` Alan Third
2020-12-11  8:18                 ` Eli Zaretskii
2020-12-11 20:37                   ` Alan Third
2020-12-13 19:05                     ` Eli Zaretskii
2020-12-13 19:46                       ` Alan Third
2020-12-14  0:20                         ` Konrad Podczeck
2020-12-14 15:47                           ` martin rudalics
2020-12-14 20:46                             ` Konrad Podczeck
2020-12-15  7:58                               ` martin rudalics
2020-12-15 13:27                                 ` Konrad Podczeck
2020-12-15 13:51                                   ` martin rudalics
2020-12-15 14:06                                     ` Konrad Podczeck
2020-12-15 15:20                                       ` martin rudalics
2020-12-15 19:31                                         ` Konrad Podczeck
2020-12-15 19:45                                           ` Eli Zaretskii
2020-12-15 19:52                                             ` Konrad Podczeck
2020-12-15 20:05                                               ` Eli Zaretskii
2020-12-15 20:12                                                 ` Konrad Podczeck
2020-12-15 20:32                                                   ` Eli Zaretskii
2020-12-16  8:46                                                 ` martin rudalics
2020-12-16 15:58                                                   ` Eli Zaretskii
2020-12-16  8:46                                           ` martin rudalics
2020-12-16 16:00                                             ` Eli Zaretskii
2020-12-16 16:53                                               ` martin rudalics
2020-12-16 17:18                                                 ` Eli Zaretskii
2020-12-16 18:51                                                   ` martin rudalics
2020-12-16 19:35                                                     ` Eli Zaretskii
2020-12-17  7:29                                                       ` martin rudalics
2020-12-16 20:29                                                     ` Konrad Podczeck
2020-12-17  7:29                                                       ` martin rudalics
2020-12-17 10:19                                                         ` Konrad Podczeck
2020-12-17 13:21                                                           ` martin rudalics
2020-12-17 14:44                                                             ` Eli Zaretskii
2020-12-17 15:13                                                               ` martin rudalics
2020-12-17 16:54                                                                 ` Eli Zaretskii
2020-12-17 17:34                                                                   ` martin rudalics
2020-12-17 18:01                                                                     ` Eli Zaretskii
2020-12-17 23:19                                                                       ` martin rudalics
2020-12-18  7:50                                                                         ` Eli Zaretskii
2020-12-18  8:39                                                                           ` martin rudalics
2020-12-18 11:45                                                                             ` Eli Zaretskii
2020-12-18 13:57                                                                               ` martin rudalics
2020-12-19 10:04                                                                                 ` Eli Zaretskii
2020-12-17 16:40                                                             ` Konrad Podczeck
2020-12-17 17:05                                                               ` martin rudalics
2020-12-17 17:24                                                               ` Eli Zaretskii
2020-12-17 14:04                                                         ` Eli Zaretskii
2020-12-17 15:13                                                           ` martin rudalics
2020-12-17 16:49                                                             ` Eli Zaretskii
2020-12-17 17:34                                                               ` martin rudalics
2020-12-16 21:31                                       ` Alan Third
2020-12-16 23:53                                         ` Konrad Podczeck
2020-12-15 16:52                                 ` Eli Zaretskii
2020-12-15 17:14                                   ` martin rudalics
2020-12-15 18:35                                     ` Eli Zaretskii
2020-12-14 16:17                           ` Eli Zaretskii
2020-12-14 20:48                             ` Konrad Podczeck
2020-12-14 21:01                               ` Eli Zaretskii
2020-12-14 16:12                         ` Eli Zaretskii
2020-12-14 20:25                           ` Alan Third [this message]
2020-12-14 20:54                             ` Eli Zaretskii
2020-12-14 21:14                               ` Alan Third
2020-12-15  7:59                               ` martin rudalics
2020-12-15 17:38                                 ` Alan Third
2020-12-15 18:54                                   ` martin rudalics
2020-12-15 19:50                                     ` Alan Third
2020-12-16  8:46                                       ` martin rudalics
2020-12-16 21:35                                         ` Alan Third
2020-12-17 17:47                           ` Stefan Monnier
2020-12-17 18:16                             ` Eli Zaretskii
2020-12-17 19:45                               ` Stefan Monnier
2020-12-17 20:36                                 ` Eli Zaretskii
2020-12-17 21:07                                   ` Stefan Monnier
2020-12-18  7:43                                     ` Eli Zaretskii
2020-12-18 16:22                                       ` Stefan Monnier
2020-12-18 20:42                                         ` Eli Zaretskii
2020-12-18 23:12                                           ` Stefan Monnier
2020-12-19  7:44                                             ` Eli Zaretskii
2020-12-17 19:56                               ` Stefan Monnier
2020-12-17 20:35                                 ` Stefan Monnier
2020-12-17 20:58                                   ` Eli Zaretskii
2020-12-17 21:24                                     ` Stefan Monnier
2020-12-18  7:46                                       ` Eli Zaretskii
2020-12-18 14:41                                         ` Stefan Monnier
2020-12-17 20:47                                 ` Eli Zaretskii
2020-12-17 23:19                             ` martin rudalics
2020-12-17 23:24                               ` Stefan Monnier
2020-12-17 23:29                               ` Stefan Monnier
2020-12-18  7:56                                 ` martin rudalics
2021-05-21 10:23 ` bug#42406: macOS metal rendering engine in mac port Konrad Podczeck
2021-05-21 15:33   ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9fKOgXkHCiAQx57@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=42406@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=konrad.podczeck@univie.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).