mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
4bceaf5505
eglSwapBuffers is allowed to block when called with a nonzero interval parameter. On Wayland, Mesa will block until a frame callback arrives. If an application is not visible, a compositor is free to not schedule frame callbacks (in order to save CPU time rendering something that is entirely invisible). Currently, starting Looking Glass from a terminal, hiding it entirely, and sending ^C will cause Looking Glass to hang joining the render thread until the window is made visible again. Calling eglDestroySurface is insufficient to unblock eglSwapBuffers, as it attempts to grab the same underlying mutex. Instead, this commit makes it so that we pass a 0 interval to eglSwapBuffers when running on Wayland, such that we don't block waiting for a frame callback. This is not entirely ideal as it *does* mean Looking Glass submits buffers while hidden, but it seems better than hanging on exit. It also forces opengl:vsync and egl:vsync flags to off when running on Wayland, as they are meaningless there. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
opengl.c |