Skip to content

Commit

Permalink
rdpgfx/server: Fix for windows10 clients
Browse files Browse the repository at this point in the history
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
  • Loading branch information
realjiangms committed Aug 20, 2016
1 parent 5d4e9a2 commit 92ca985
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/shadow/shadow_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 92ca985

Please sign in to comment.