What's with "guard !foo else return" instead of "if foo return", is that just how Swift is written?
"Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
21–30 of 115 posts
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#22But at the moment when it lags the system switches from hardware cursor to software cursor (CGCursorIsDrawnInFramebuffer() goes from 0 to 1) so maybe that transition is stalled somehow on Macbook Neo. With the disclaimer that I have zero knowledge of the MacBook Neo hardware, but I do know a bit about GPUs in general (including having written some GPU-accelerated drivers for Windows and the associated cursor-handling…
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#23But at the moment when it lags the system switches from hardware cursor to software cursor (CGCursorIsDrawnInFramebuffer() goes from 0 to 1) so maybe that transition is stalled somehow on Macbook Neo. With the disclaimer that I have zero knowledge of the MacBook Neo hardware, but I do know a bit about GPUs in general (including having written some GPU-accelerated drivers for Windows and the associated cursor-handling…
If a hardware layer is not being used the cursor layer will be treated like any other layer in the compositor. Modern compositors don't try and save and write pixels like that. It will just rerender it.
>(which is normally done per mouse interrupt);
It's normally done every frame the compositor makes.
>or it may end up drawing over what software wants to draw
The compositor composites everything at that will be shown on the next refresh of the display. Things don't indepently step on each others toes since it's just the compositor rendering and synchronizing all hardware layers (planes).
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#24I’m not sure what the bug is, but this is a terrible fix. What this is doing is forcing the WindowServer to composite the cursor rather than treat it as a hardware overlay. I suppose the issue must be pretty bad for OP if this helps, but … ugh.
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#25Steve turning in his grave
Relevant quote from https://www.folklore.org/Shut_Up.html : We showed [Gates] how the Macintosh mouse cursor moved smoothly, in a flicker-free fashion. "What kind of hardware do you use to draw the cursor?", he asked. Many current personal computers had special hardware to draw small bitmaps called "sprites", and he thought we might be doing something similar.
The audacity of developers to restart the discussion whether the mouse should follow user input induces rage on so many levels.
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#26But at the moment when it lags the system switches from hardware cursor to software cursor (CGCursorIsDrawnInFramebuffer() goes from 0 to 1) so maybe that transition is stalled somehow on Macbook Neo. With the disclaimer that I have zero knowledge of the MacBook Neo hardware, but I do know a bit about GPUs in general (including having written some GPU-accelerated drivers for Windows and the associated cursor-handling…
the cursor could just be another small rectangle texture you position on top of the other surfaces. there is no need to read the framebuffer/write into it, its just a z-stack of 3d surfaces now
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#27Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#28I’m not sure what the bug is, but this is a terrible fix. What this is doing is forcing the WindowServer to composite the cursor rather than treat it as a hardware overlay. I suppose the issue must be pretty bad for OP if this helps, but … ugh.
Terrible fix but it's a fix that's minimally-invasive and addresses a bug that causes a disproportionate annoyance to the fix. I can imagine your cursor lagging is something that is extremely annoying over time.
Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#29Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds
#30The root cause for the issue is probably (I'm not an Apple developer) due to huge round rectangles on the window shape corners. Rendering the window with the corners would include rendering whatever other windows and widgets under the window. (Which will have a lag and some more operations with transparency, which the developers probably want to avoid - while I'm not sure about this part).