all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: dancol@dancol.org
Cc: raeburn@raeburn.org, emacs-devel@gnu.org
Subject: Re: RFC: flicker-free double-buffered Emacs under X11
Date: Thu, 27 Oct 2016 22:36:36 +0300	[thread overview]
Message-ID: <831sz1twhn.fsf@gnu.org> (raw)
In-Reply-To: <740d34db48a1e4b711cb1cfa987423c9.squirrel@dancol.org>

> Date: Thu, 27 Oct 2016 12:06:25 -0700
> From: dancol@dancol.org
> Cc: Daniel Colascione <dancol@dancol.org>, Ken Raeburn <raeburn@raeburn.org>,
> 	emacs-devel@gnu.org
> 
> Below is a new much-improved version of the patch. It should address the
> legibility concerns while probably adding more. It addresses all the bugs
> I've been able to find and on my machine, produces buttery smooth editing
> and resizing.

Thanks.

> >> Why _do_ we have a path that short-circuits the rest of the redisplay
> >> code? What would happen if we just removed it? It appears to be some
> >> kind of optimization, and I'm not sure it's actually necessary
> >> (especially since, according to the comment, we disable it anyway in the
> >> case of a blinking cursor).
> >
> > It's an optimization for the case that nothing needs to be
> > redisplayed.
> 
> Isn't the "goto update" path fast enough?

That would still call hscroll_windows and update_frame, which is just
waste of cycles when we know nothing's changed.

> @@ -14072,6 +14072,17 @@ redisplay_internal (void)
>  		  if (!f_redisplay_flag && f->redisplay)
>                      goto retry_frame;
> 
> +                  /* In some case (e.g., window resize), we notice
> +                     only during window updating that the window
> +                     content changed unpredictably (e.g., a GTK
> +                     scrollbar moved) and that our previous estimation
> +                     of the frame content was garbage.  We have to
> +                     start over.  These cases should be rare, so going
> +                     all the way back to the top of redisplay should
> +                     be good enough.  */
> +                  if (FRAME_GARBAGED_P (f))
> +                    goto retry;

This worries me a bit: FRAME_GARBAGED_P returns non-zero for TTY
frames very frequently, whereas at least the comment seems to imply
this is needed only for GUI frames, perhaps even only in GTK builds.
If that is correct, then perhaps add a FRAME_WINDOW_P test here, to
avoid unnecessarily slowing down redisplay.

Thanks again for working on this.



  reply	other threads:[~2016-10-27 19:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21  1:32 RFC: flicker-free double-buffered Emacs under X11 Daniel Colascione
2016-10-21  2:27 ` Lars Ingebrigtsen
2016-10-21  2:31   ` Daniel Colascione
2016-10-21  3:24 ` Óscar Fuentes
2016-10-21  3:31   ` Clément Pit--Claudel
2016-10-21  3:41     ` Óscar Fuentes
2016-10-21  3:50       ` Clément Pit--Claudel
2016-10-21  8:23     ` Andreas Schwab
2016-10-21  8:25       ` Andreas Schwab
2016-10-21  3:56 ` Clément Pit--Claudel
2016-10-21  8:49 ` Eli Zaretskii
2016-10-21 11:04   ` Daniel Colascione
2016-10-21 17:43     ` Eli Zaretskii
2016-10-21 18:27       ` Daniel Colascione
2016-10-21 19:27         ` Eli Zaretskii
2016-10-23 20:51           ` Daniel Colascione
2016-10-24  8:05             ` Eli Zaretskii
2016-10-24 18:43               ` Ken Raeburn
2016-10-27 19:06               ` dancol
2016-10-27 19:36                 ` Eli Zaretskii [this message]
     [not found]                   ` <db81befd-7a72-58d9-b7a8-107df89bcab3@dancol.org>
2016-10-27 19:56                     ` Daniel Colascione
2016-10-28  6:31                       ` Eli Zaretskii
2016-10-27 22:18                 ` Paul Eggert
2016-10-27 22:46                   ` Clément Pit--Claudel
2016-10-28 13:14                     ` Stefan Monnier
2016-11-01  0:03                       ` Dmitry Gutov
2016-10-27 23:10                   ` Daniel Colascione
2016-10-28  2:07                     ` Paul Eggert
2016-10-28  7:19                       ` Eli Zaretskii
2016-11-06  3:51                         ` Paul Eggert
2016-11-06 15:46                           ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=831sz1twhn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=raeburn@raeburn.org \
    /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 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.