[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macOS metal rendering engine in mac port
From: |
Aaron Jensen |
Subject: |
Re: macOS metal rendering engine in mac port |
Date: |
Tue, 25 May 2021 17:32:09 -0700 |
On Tue, May 25, 2021 at 9:31 AM Aaron Jensen <aaronjensen@gmail.com> wrote:
>
> On Mon, May 24, 2021 at 2:01 AM Alan Third <alan@idiocy.org> wrote:
> >
> > I think so. A lot of what people like (smooth scrolling, etc.) would
> > have to be removed.
>
> Weird, this has never worked for me, but maybe I've had it misconfigured
>
> > One more thing to try...
> >
> > modified src/nsterm.m
> > @@ -8376,7 +8376,13 @@ - (void)unfocusDrawingBuffer
> > NSTRACE ("[EmacsView unfocusDrawingBuffer]");
> >
> > [NSGraphicsContext setCurrentContext:nil];
> > - [self setNeedsDisplay:YES];
> > + [surface releaseContext];
> > + [[self layer] setContents:(id)[surface getSurface]];
> > + [surface performSelectorOnMainThread:@selector (getContext)
> > + withObject:nil
> > + waitUntilDone:NO];
> > +
> > + //[self setNeedsDisplay:YES];
> > }
> >
> >
> > @@ -8513,11 +8519,11 @@ - (void)updateLayer
> > There's a private method, -[CALayer setContentsChanged], that we
> > could use to force it, but we shouldn't often get the same
> > surface twice in a row. */
> > - [surface releaseContext];
> > - [[self layer] setContents:(id)[surface getSurface]];
> > - [surface performSelectorOnMainThread:@selector (getContext)
> > - withObject:nil
> > - waitUntilDone:NO];
> > + // [surface releaseContext];
> > + // [[self layer] setContents:(id)[surface getSurface]];
> > + // [surface performSelectorOnMainThread:@selector (getContext)
> > + // withObject:nil
> > + // waitUntilDone:NO];
> > }
> > #endif
> >
> >
> > All this does is reduce the time between us deciding we're done with
> > drawing and sending it off to VRAM (although it might not, I'm not
> > entirely sure when updateLayer gets called).
> >
> > I expect this to reduce frame rate, but perhaps it will improve input
> > lag a little.
>
> I don't know if it's something funky with my machine or not but I've
> noticed some stutters with this patch. As in, it appears to miss
> paints. I'll type a character and won't see it until I type something
> else. Is it possible that this patch could cause that?
This stopped, so maybe it was something funky. So far, today, things
feel pretty good from a latency perspective. I haven't measured
anything yet.
Thanks,
Aaron
- Re: macOS metal rendering engine in mac port, (continued)
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/23
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/23
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/23
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/23
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/23
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/24
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/25
- Re: macOS metal rendering engine in mac port,
Aaron Jensen <=
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/26
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/26
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/26
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/28
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/28
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/28
- Re: macOS metal rendering engine in mac port, Alan Third, 2021/05/28
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/28
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/29