set SURFACE_BITS_COMMAND cmdType explicitly

dev
Ken C 5 years ago committed by Daniel Stone
parent 3002a38177
commit 6b64d39ab7
  1. 16
      libweston/backend-rdp/meson.build
  2. 15
      libweston/backend-rdp/rdp.c

@ -26,6 +26,22 @@ if cc.has_member(
config_h.set('HAVE_SURFACE_BITS_BMP', '1') config_h.set('HAVE_SURFACE_BITS_BMP', '1')
endif endif
if cc.has_type(
'enum SURFCMD_CMDTYPE',
dependencies : dep_frdp,
prefix : '#include <freerdp/update.h>'
)
config_h.set('HAVE_SURFCMD_CMDTYPE', '1')
endif
if cc.has_function(
'nsc_context_set_parameters',
dependencies : dep_frdp,
prefix: '#include <freerdp/codec/nsc.h>'
)
config_h.set('HAVE_NSC_CONTEXT_SET_PARAMETERS', '1')
endif
deps_rdp = [ deps_rdp = [
dep_libweston_private, dep_libweston_private,
dep_frdp, dep_frdp,

@ -212,6 +212,9 @@ rdp_peer_refresh_rfx(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
cmd.skipCompression = TRUE; cmd.skipCompression = TRUE;
#else #else
memset(&cmd, 0, sizeof(*cmd)); memset(&cmd, 0, sizeof(*cmd));
#endif
#ifdef HAVE_SURFCMD_CMDTYPE
cmd.cmdType = CMDTYPE_STREAM_SURFACE_BITS;
#endif #endif
cmd.destLeft = damage->extents.x1; cmd.destLeft = damage->extents.x1;
cmd.destTop = damage->extents.y1; cmd.destTop = damage->extents.y1;
@ -270,7 +273,9 @@ rdp_peer_refresh_nsc(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
#else #else
memset(cmd, 0, sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd));
#endif #endif
#ifdef HAVE_SURFCMD_CMDTYPE
cmd.cmdType = CMDTYPE_SET_SURFACE_BITS;
#endif
cmd.destLeft = damage->extents.x1; cmd.destLeft = damage->extents.x1;
cmd.destTop = damage->extents.y1; cmd.destTop = damage->extents.y1;
cmd.destRight = damage->extents.x2; cmd.destRight = damage->extents.x2;
@ -326,6 +331,9 @@ rdp_peer_refresh_raw(pixman_region32_t *region, pixman_image_t *image, freerdp_p
update->SurfaceFrameMarker(peer->context, &marker); update->SurfaceFrameMarker(peer->context, &marker);
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
#ifdef HAVE_SURFCMD_CMDTYPE
cmd.cmdType = CMDTYPE_SET_SURFACE_BITS;
#endif
SURFACE_BPP(cmd) = 32; SURFACE_BPP(cmd) = 32;
SURFACE_CODECID(cmd) = 0; SURFACE_CODECID(cmd) = 0;
@ -758,8 +766,11 @@ rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
if (!context->nsc_context) if (!context->nsc_context)
goto out_error_nsc; goto out_error_nsc;
#ifdef HAVE_NSC_CONTEXT_SET_PARAMETERS
nsc_context_set_parameters(context->nsc_context, NSC_COLOR_FORMAT, DEFAULT_PIXEL_FORMAT);
#else
nsc_context_set_pixel_format(context->nsc_context, DEFAULT_PIXEL_FORMAT); nsc_context_set_pixel_format(context->nsc_context, DEFAULT_PIXEL_FORMAT);
#endif
context->encode_stream = Stream_New(NULL, 65536); context->encode_stream = Stream_New(NULL, 65536);
if (!context->encode_stream) if (!context->encode_stream)
goto out_error_stream; goto out_error_stream;

Loading…
Cancel
Save