From: Doug Davis <ddavis@ddavis.io>
To: Alan Third <alan@idiocy.org>
Cc: 42834@debbugs.gnu.org
Subject: bug#42834: 28.0.50; macOS scroll and movement latency slows when display changes
Date: Thu, 13 Aug 2020 11:42:21 -0400 [thread overview]
Message-ID: <m2tux6mu1u.fsf@ddavis.io> (raw)
In-Reply-To: <20200813150024.GB26932@breton.holly.idiocy.org>
Alan Third writes:
> On Wed, Aug 12, 2020 at 05:48:47PM -0400, Doug Davis wrote:
>> > Do you see the same thing going the other way? (laptop screen -> monitor)
>>
>> Ah yes, forgot to mention that- seeing it both ways.
>
> Excellent!
>
>> > Is your monitor a retina screen?
>>
>> Yeah the MacBook is retina and the external display is 4k.
>
> I think I know what's going on. If you don't use the exact same
> settings for the drawing buffer as for the screen then some very slow
> conversion processes kick in every time you flush the buffer to the
> screen.
>
> Odds are that the monitor and laptop screen have something slightly
> different, probably a colorspace or something, so when switching from
> one to the other the drawing buffer retains the settings for the old
> screen.
>
> Can you try the following change in nsterm.m?
>
> @@ -8431,18 +8431,10 @@ - (void)windowDidChangeBackingProperties:(NSNotification *)notification
> if (! [self wantsUpdateLayer])
> return;
>
> - CGFloat old = [[[notification userInfo]
> - objectForKey:@"NSBackingPropertyOldScaleFactorKey"]
> - doubleValue];
> - CGFloat new = [[self window] backingScaleFactor];
> -
> - if (old != new)
> - {
> - NSRect frame = [self frame];
> - [self createDrawingBuffer];
> - ns_clear_frame (emacsframe);
> - expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
> - }
> + NSRect frame = [self frame];
> + [self createDrawingBuffer];
> + ns_clear_frame (emacsframe);
> + expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
> }
> #endif /* NS_DRAW_TO_BUFFER */
That patch does indeed appear to be the solution-- tested the exact same
situation and now without the sluggishness issue.
Thanks!
next prev parent reply other threads:[~2020-08-13 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 18:48 bug#42834: 28.0.50; macOS scroll and movement latency slows when display changes Doug Davis
2020-08-12 21:24 ` Alan Third
2020-08-12 21:48 ` Doug Davis
2020-08-13 15:00 ` Alan Third
2020-08-13 15:42 ` Doug Davis [this message]
2020-08-13 18:12 ` Alan Third
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=m2tux6mu1u.fsf@ddavis.io \
--to=ddavis@ddavis.io \
--cc=42834@debbugs.gnu.org \
--cc=alan@idiocy.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 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).