Merge pull request #3541 from realjiangms/fix_after_color_conversion_nsc

Fix nsc client after after color conversion huge fix
This commit is contained in:
akallabeth 2016-10-11 09:25:19 +02:00 committed by GitHub
commit 1ea248195a
3 changed files with 10 additions and 5 deletions

View File

@ -1018,7 +1018,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context,
if (!nsc_process_message(context->codecs->nsc, cmd->bpp, cmd->width,
cmd->height,
cmd->bitmapData, cmd->bitmapDataLength,
xfc->bitmap_buffer, gdi->dstFormat, 0, 0, 0, cmd->width, cmd->height))
gdi->primary_buffer, gdi->dstFormat, 0, 0, 0, cmd->width, cmd->height))
{
xf_unlock_x11(xfc, FALSE);
return FALSE;
@ -1026,8 +1026,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context,
XSetFunction(xfc->display, xfc->gc, GXcopy);
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
pSrcData = context->codecs->nsc->BitmapData;
pDstData = xfc->bitmap_buffer;
pDstData = gdi->primary_buffer;
image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,
(char*) pDstData, cmd->width, cmd->height, xfc->scanline_pad, 0);
XPutImage(xfc->display, xfc->primary, xfc->gc, image, 0, 0,
@ -1042,7 +1041,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context,
XSetFunction(xfc->display, xfc->gc, GXcopy);
XSetFillStyle(xfc->display, xfc->gc, FillSolid);
pSrcData = cmd->bitmapData;
pDstData = xfc->bitmap_buffer;
pDstData = gdi->primary_buffer;
freerdp_image_copy(pDstData, gdi->dstFormat, 0, 0, 0,
cmd->width, cmd->height, pSrcData,
PIXEL_FORMAT_BGRX32_VF, 0, 0, 0, &xfc->context.gdi->palette);

View File

@ -407,7 +407,7 @@ BOOL nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
if (!freerdp_image_copy(pDstData, DstFormat, nDstStride, nXDst, nYDst,
width, height, context->BitmapData,
PIXEL_FORMAT_BGRA32, 0, 0, 0, NULL))
PIXEL_FORMAT_BGRX32_VF, 0, 0, 0, NULL))
return FALSE;
return TRUE;

View File

@ -1060,6 +1060,12 @@ static BOOL gdi_surface_bits(rdpContext* context,
break;
}
if (!gdi_InvalidateRegion(gdi->primary->hdc, cmd->destLeft, cmd->destTop, cmd->width, cmd->height))
{
WLog_ERR(TAG, "Failed to update invalid region");
return FALSE;
}
return TRUE;
}