[client] x11: move sleep and calibration code outside of the event loop

Sleeping in the x11 event loop is not ideal as it will introduce latency
when processing other events, instead do this in the waitFrame handler.
This commit is contained in:
Geoffrey McRae
2021-08-04 06:30:21 +10:00
parent 6933c278ce
commit 0f7fa32d12
2 changed files with 75 additions and 66 deletions

View File

@@ -40,12 +40,13 @@ struct X11DSState
Window window;
XVisualInfo * visual;
int xpresentOp;
bool jitRender;
uint32_t presentSerial;
Pixmap presentPixmap;
XserverRegion presentRegion;
LGEvent * frameEvent;
int xpresentOp;
bool jitRender;
_Atomic(uint64_t) presentMsc, presentUst;
uint32_t presentSerial;
Pixmap presentPixmap;
XserverRegion presentRegion;
LGEvent * frameEvent;
LGThread * eventThread;