Subject: bug#32932: 27.0.50; render bugs on macOS Mojave

From: Alan Third <[email-masked]>
Date: Sun, 2 Feb 2020 13:42:28 +0000

On Sat, Feb 01, 2020 at 03:05:45PM -0800, Aaron Jensen wrote:
> On Sat, Feb 1, 2020 at 1:20 PM Alan Third <[email-masked]> wrote:
> >
> > Can you try the attached patch? It looks like it’s faster here, but I
> > can’t really tell.
> 
> Moving the point is definitely faster. It's still slower as the window
> gets larger, but that's not really new behavior (27 is that way too).
> Scrolling speed is still unbearable, however.

Out of interest, is the mac port fast under the same conditions? Here
their performance seems to be almost identical with the mac port only
fractionally faster, and their performance scales similarly with frame
size.

> I don't know if you've seen or read this, but I came across this just
> now, but haven't looked too closely:
> 
> https://books.google.com/books?id=QyFta827Y0gC&pg=PA85&lpg=PA85&dq=quartz+double+buffering&source=bl&ots=seLTG6QxV9&sig=ACfU3U35VUiIowXtgJsaky73k5aAPSNRlw&hl=en&ppis=_c&sa=X&ved=2ahUKEwj_uOzZt7HnAhXQrJ4KHR8qDo0Q6AEwAXoECAwQAQ#v=onepage&q=quartz%20double%20buffering&f=false
> 
> I'm curious if there's some nugget in there that might lead to a way
> to do normal double buffering instead of this approach, since:
> 
> "Buffering. Although you can use layers for this purpose, you
> shouldn’t need to because the Quartz Compositor makes buffering on
> your part unnecessary. If you must draw to a buffer, use a layer
> instead of a bitmap graphics context." via
> https://books.google.com/books?id=QyFta827Y0gC&pg=PA85&lpg=PA85&dq=quartz+double+buffering&source=bl&ots=seLTG6QxV9&sig=ACfU3U35VUiIowXtgJsaky73k5aAPSNRlw&hl=en&ppis=_c&sa=X&ved=2ahUKEwj_uOzZt7HnAhXQrJ4KHR8qDo0Q6AEwAXoECAwQAQ#v=onepage&q=quartz%20double%20buffering&f=false

I think that second URL is wrong, but I’ve read that quote before.
Normal double buffering is simply drawing like we do on Emacs 27.
There are plenty of places in the documentation that push you towards
just drawing when you want to recreate part of the screen, however as
we know Emacs redisplay isn’t really amenable to that approach.

It’s annoying, because Emacs 27 scrolls about 5x faster than the
buffer method.

-- 
Alan Third