neovide icon indicating copy to clipboard operation
neovide copied to clipboard

chore: Support multiple render backends

Open fredizzimo opened this issue 2 years ago • 3 comments

What kind of change does this PR introduce?

This is mostly a refactoring in order to support multiple render backends, like D3D, and makes the actual PR that implements the D3D backend much smaller.

  • WindowContext has been renamed to SkiaRenderer, which can have different implementations depending on the platform
  • The Gpu profiling system now supports multiple backends, and code has been moved to a dedicated opengl implementation
  • VSyncWin has been renamed to VSyncWinDwm to allow a swapchain implementation for D3D.
  • The latency reduction optimization has been removed, as it is incompatible with some render backends.

Did this PR introduce a breaking change?

  • No

fredizzimo avatar Feb 14 '24 00:02 fredizzimo

Test results:

  • On native wayland, everything's fine and smooth as ever.
  • On Xwayland, there's a few freezes the first few seconds after starting up, where interestingly the view keeps updating (the profiler keeps moving and displaying), but the entire text contents are not responding to any keypresses for a few seconds. Maybe this doesn't come from this PR though, I haven't tested main in a while.

MultisampledNight avatar Feb 14 '24 02:02 MultisampledNight

After retrying a few times between main and this branch on Xwayland, I can't seem to reproduce what I found initially, and found no meaningful differences. Ignore that then.

MultisampledNight avatar Feb 14 '24 02:02 MultisampledNight

I'm not sure about the XWayland freeze, I can't think of any changes that could cause it, except this one https://github.com/neovide/neovide/pull/2359/commits/110ea9957a003f1fe85eec53542be0e19474da97, but that should not affect x11 or xwayland at all.

The rest of the code should have stayed functionally the same.

fredizzimo avatar Feb 14 '24 07:02 fredizzimo