[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macOS metal rendering engine in mac port
From: |
Alan Third |
Subject: |
Re: macOS metal rendering engine in mac port |
Date: |
Tue, 21 Sep 2021 19:48:50 +0100 |
On Tue, Sep 21, 2021 at 10:22:38AM +0300, Y. E. wrote:
>
> > I just had this happen to me as well, screenshots attached.
>
> I confirm these screenshots correspond exactly to the issue I saw.
> [I had no new cases so far.]
Both of these look rather like copyRect is playing up but I can't see
what's wrong with it. There are only two callers of copyRect and I
can't see anything wrong with them either (and if it was THEIR callers
playing up we'd see similar problems outside of the NS port).
Aaron's actually looks like it could be copying FAR larger areas than
it's supposed to be (for example, wrapping off the right of the screen
and back on the left).
Illia's looks just like what happens when scrolling goes wrong. Bits
of lines end up on the wrong lines and then they get repeated as Emacs
copies bits of the frame around.
Maybe we just need to do something like this:
modified src/nsterm.m
@@ -7882,6 +7882,7 @@ - (void)copyRect:(NSRect)srcRect to:(NSRect)dstRect
#ifdef NS_IMPL_COCOA
if ([self wantsLayer])
{
+ ns_focus (emacsframe, nil, 0);
double scale = [[self window] backingScaleFactor];
CGContextRef context = [[NSGraphicsContext currentContext] CGContext];
int bpp = CGBitmapContextGetBitsPerPixel (context) / 8;
@@ -7906,7 +7907,7 @@ - (void)copyRect:(NSRect)srcRect to:(NSRect)dstRect
memmove ((char *) dstPixels + y * rowSize,
(char *) srcPixels + y * rowSize,
srcRowSize);
-
+ ns_unfocus (emacsframe);
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
else
It seems unlikely, though...
--
Alan Third
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/09/15
- Re: macOS metal rendering engine in mac port, Illia Ostapyshyn, 2021/09/15
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/09/15
- Re: macOS metal rendering engine in mac port, Y . E ., 2021/09/16
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/09/17
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/09/17
- Re: macOS metal rendering engine in mac port, Y . E ., 2021/09/18
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/09/19
- Re: macOS metal rendering engine in mac port, Illia Ostapyshyn, 2021/09/20
- Re: macOS metal rendering engine in mac port, Y . E ., 2021/09/21
- Re: macOS metal rendering engine in mac port,
Alan Third <=
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/09/27
Re: macOS metal rendering engine in mac port, Rudolf Adamkovič, 2021/09/16