From 92ca9851d2b553ce4d0a09e701514b52bb9ad506 Mon Sep 17 00:00:00 2001 From: "zihao.jiang" Date: Sun, 21 Aug 2016 01:02:13 +0800 Subject: [PATCH] rdpgfx/server: Fix for windows10 clients 1. Fix order of gfx reset and new-surface. Windows10 client will show black screen with this issue(FreeRDP itself is dramatically immune to this issue) 2. Handle RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU for FPS control --- server/shadow/shadow_client.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index ba0a80365..e978d5bbd 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -606,6 +606,12 @@ static UINT shadow_client_rdpgfx_frame_acknowledge(RdpgfxServerContext* context, frameAcknowledge->frameId); return CHANNEL_RC_OK; } +static UINT shadow_client_rdpgfx_qoe_frame_acknowledge(RdpgfxServerContext* context, RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge) +{ + shadow_client_common_frame_acknowledge((rdpShadowClient *)context->custom, + qoeFrameAcknowledge->frameId); + return CHANNEL_RC_OK; +} /** * Function description @@ -1172,10 +1178,10 @@ static BOOL shadow_client_send_surface_update(rdpShadowClient* client, SHADOW_GF if (!pStatus->gfxSurfaceCreated) { /* Only init surface when we have h264 supported */ - if (!(ret = shadow_client_rdpgfx_new_surface(client))) + if (!(ret = shadow_client_rdpgfx_reset_graphic(client))) goto out; - if (!(ret = shadow_client_rdpgfx_reset_graphic(client))) + if (!(ret = shadow_client_rdpgfx_new_surface(client))) goto out; pStatus->gfxSurfaceCreated = TRUE; @@ -1534,6 +1540,7 @@ static void* shadow_client_thread(rdpShadowClient* client) } client->rdpgfx->FrameAcknowledge = shadow_client_rdpgfx_frame_acknowledge; + client->rdpgfx->QoeFrameAcknowledge = shadow_client_rdpgfx_qoe_frame_acknowledge; gfxstatus.gfxOpened = TRUE; WLog_INFO(TAG, "Gfx Pipeline Opened");