chore: Support multiple render backends
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
openglimplementation -
VSyncWinhas been renamed toVSyncWinDwmto 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
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.
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.
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.