freerdp: add server-side Bitmap Cache v3 and Frame Marker negotiation

This commit is contained in:
Marc-André Moreau 2013-06-21 19:20:20 -04:00
parent e166840a26
commit f6df97c61e
2 changed files with 27 additions and 0 deletions

View File

@ -448,6 +448,8 @@ BOOL rdp_read_order_capability_set(wStream* s, UINT16 length, rdpSettings* setti
UINT16 orderFlags;
BYTE orderSupport[32];
UINT16 orderSupportExFlags;
BOOL BitmapCacheV3Enabled = FALSE;
BOOL FrameMarkerCommandEnabled = FALSE;
if (length < 88)
return FALSE;
@ -476,6 +478,23 @@ BOOL rdp_read_order_capability_set(wStream* s, UINT16 length, rdpSettings* setti
settings->OrderSupport[i] = FALSE;
}
if (orderFlags & ORDER_FLAGS_EXTRA_SUPPORT)
{
if (orderSupportExFlags & CACHE_BITMAP_V3_SUPPORT)
BitmapCacheV3Enabled = TRUE;
if (orderSupportExFlags & ALTSEC_FRAME_MARKER_SUPPORT)
FrameMarkerCommandEnabled = TRUE;
}
if (settings->BitmapCacheV3Enabled && BitmapCacheV3Enabled)
settings->BitmapCacheVersion = 3;
else
settings ->BitmapCacheV3Enabled = FALSE;
if (settings->FrameMarkerCommandEnabled && !FrameMarkerCommandEnabled)
settings->FrameMarkerCommandEnabled = FALSE;
return TRUE;
}

View File

@ -724,11 +724,15 @@ static void update_send_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND*
wStream* s;
rdpRdp* rdp = context->rdp;
update_force_flush(context);
s = fastpath_update_pdu_init(rdp->fastpath);
Stream_EnsureRemainingCapacity(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH + (int) surface_bits_command->bitmapDataLength);
update_write_surfcmd_surface_bits_header(s, surface_bits_command);
Stream_Write(s, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_SURFCMDS, s);
update_force_flush(context);
}
static void update_send_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker)
@ -736,9 +740,13 @@ static void update_send_surface_frame_marker(rdpContext* context, SURFACE_FRAME_
wStream* s;
rdpRdp* rdp = context->rdp;
update_force_flush(context);
s = fastpath_update_pdu_init(rdp->fastpath);
update_write_surfcmd_frame_marker(s, surface_frame_marker->frameAction, surface_frame_marker->frameId);
fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_SURFCMDS, s);
update_force_flush(context);
}
static void update_send_frame_acknowledge(rdpContext* context, UINT32 frameId)