mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-17 03:31:24 -04:00
NVIDIA drivers appears to have a bug where binding would be excessively
slow. Apply a workaround similar to what [KWin] does to prevent the issue.
Also performs a refactor so that the code paths with and without the
workaround can be shared.
[KWin]: https://github.com/KDE/kwin/blob/4f2c3a00c4a86c08321e80d601fecd09d0871c79/src/libkwineffects/kwinglplatform.cpp
Fixes: 316f858c6 ("linux-capture: Fix capturing on software rasterization setups")
Closes: https://github.com/obsproject/obs-studio/issues/5685
Tested-By: univrsal <uni@vrsal.xyz>