Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMO, the neatest trick that the DWM does is avoiding jitter/lag between the mouse cursor and window when dragging a window.

Sadly, DXGI flip model seems to have reintroduced some issues -- it is difficult to avoid the kind of jank shown in this article when resizing a window drawn using flip mode presentation. Which is unfortunate, since it's the highest performing mode.




It's kinda interesting that macOS doesn't even care about this problem anymore. When moving or resizing windows on macOS the hardware mouse cursor slightly trails ahead of the window, it's not very noticeable because of the 120Hz refresh rate (meaning the framebuffer surface spends less time waiting for presentation, thus reducing rendering lag) - OTH the lag is still visible, and this sort of minor visual imperfection is quite un-Apple-like (at least for 'old Apple').

It's a bit similar to how high resolution displays make fancy subpixel font rendering tricks obsolete (e.g. high display refresh rates making tricks to hide presentation latency obsolete). Sometimes hardware progress makes complex software solutions obsolete, but usually still with one or another tradeoff.


> It's a bit similar to how high resolution displays make fancy subpixel font rendering tricks obsolete

Personally, I don't think so—subpixel font rendering still has value even in the densest displays, simply because it triples the available horizontal resolution.


Unfortunately a low of newer displays (especially OLED ones) don't have regular horizontal RGB/BGR layouts anymore. I have seen both vertical subpixel layouts as well as triangle layouts or other funky subpixel arrangements. Even if you configure/update your software to those different subpixel layouts the result is not going to be as good.


But if we continued using subpixel rendering then 1080p and 1440p displays wouldn't look as terrible, and we can't have that /s


It's pretty noticeable on older apple hardware running newer macOS. Definitely a lot of compositing performance regression in Sequoia specifically.


That trick is fun, but I wish Windows did a better job of synchronizing the visibility of the cursor sprite versus the presentation of the frames where the cursor is rendered in the frame. It's impossible for me to not notice the brief period where the cursor is missing!


I think it's cute. They're doing "disable hardware cursor, enable software cursor" instead of the other way around. Seeing that happen is somehow fun for me.


I think they do both simultaneously, it's just that the cursor sprite/plane is overlaid during scan out and the software cursor is rendered in the next frame to be rendered by the compositor. The cursor sprite/plane can turn on or off pretty much mid-frame, whereas the frame that's about to be rendered could be two frames away from the one that's about to be scanned out. What you actually need to do is track when the first frame with the software cursor is about to be presented, then turn off the cursor sprite/plane. I think technically speaking all of the information needed to implement this is present somewhere, but I'm sure it's quite complicated to actually implement, possibly made worse by interface layering issues :)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: