LookingGlass/client/renderers/EGL
Tudor Brindus 4bceaf5505 [client] fix hang in eglSwapBuffers when exiting while not visible
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.
2021-01-04 14:43:21 +11:00
..
shader [client] egl: added colorblind support (egl:cbMode=0/1/2/3) 2020-11-09 07:08:15 +11:00
alert.c [client] egl: added DMA texture support for direct upload 2020-10-30 02:36:45 +11:00
alert.h [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
CMakeLists.txt [client] don't require wayland-egl, fixes #204 2019-10-26 11:23:04 +11:00
cursor.c [client] egl: cleanup/refactor of cursor texture code 2020-11-10 20:42:14 +11:00
cursor.h [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
debug.c [EGL] add debug printf helper 2019-08-30 11:33:43 +10:00
debug.h [EGL] add debug printf helper 2019-08-30 11:33:43 +10:00
desktop.c [client] egl: added colorblind support (egl:cbMode=0/1/2/3) 2020-11-09 07:08:15 +11:00
desktop.h [client] egl: added DMA texture support for direct upload 2020-10-30 02:36:45 +11:00
draw.c [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
draw.h [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
egl.c [client] fix hang in eglSwapBuffers when exiting while not visible 2021-01-04 14:43:21 +11:00
fps.c [client] egl: added DMA texture support for direct upload 2020-10-30 02:36:45 +11:00
fps.h [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
model.c [build] make "common" a static library (part 2/2) 2019-04-11 11:12:59 +10:00
model.h [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
shader.c [build] make "common" a static library (part 2/2) 2019-04-11 11:12:59 +10:00
shader.h [client] added missing include 2019-07-15 18:30:39 +10:00
splash.c [build] make "common" a static library (part 2/2) 2019-04-11 11:12:59 +10:00
splash.h [client] use cmake to generate renderers/fonts/clipboards headers/code 2019-03-28 19:56:14 +11:00
texture.c [client] egl: actually do front buffer rendering 2020-12-31 15:31:24 +11:00
texture.h [client] egl: added DMA texture support for direct upload 2020-10-30 02:36:45 +11:00