mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-20 14:22:00 +00:00
[client] hdr: serialize surface format transitions
Queue the display-server surface format while the renderer lock still serializes the matching onFrameFormat update. This prevents the render thread from presenting a frame in a new HDR encoding before the Wayland image description transition has been queued.
This commit is contained in:
@@ -777,8 +777,12 @@ int main_frameThread(void * unused)
|
||||
const bool rendererSupportsNativeHDR = !lgrFormat.hdr ||
|
||||
!g_state.lgr->ops.supports || RENDERER(supports,
|
||||
lgrFormat.hdrPQ ? LG_SUPPORTS_HDR_PQ : LG_SUPPORTS_HDR_SCRGB);
|
||||
LG_UNLOCK(g_state.lgrLock);
|
||||
// Publish the matching surface format before allowing the render thread
|
||||
// to consume the renderer format. Otherwise it can present one frame in
|
||||
// the new encoding while the display server still has the old image
|
||||
// description attached.
|
||||
renderQueue_surfaceFormat(lgrFormat, rendererSupportsNativeHDR);
|
||||
LG_UNLOCK(g_state.lgrLock);
|
||||
|
||||
g_state.srcSize.x = lgrFormat.screenWidth;
|
||||
g_state.srcSize.y = lgrFormat.screenHeight;
|
||||
|
||||
Reference in New Issue
Block a user