Fixed formatting.

This commit is contained in:
Armin Novak 2018-02-08 11:55:57 +01:00
parent 17b17d609a
commit 253beda330
2 changed files with 49 additions and 38 deletions

View File

@ -46,7 +46,6 @@ static UINT xf_OutputUpdate(xfContext* xfc, xfGfxSurface* surface)
XSetClipMask(xfc->display, xfc->gc, None); XSetClipMask(xfc->display, xfc->gc, None);
XSetFunction(xfc->display, xfc->gc, GXcopy); XSetFunction(xfc->display, xfc->gc, GXcopy);
XSetFillStyle(xfc->display, xfc->gc, FillSolid); XSetFillStyle(xfc->display, xfc->gc, FillSolid);
region16_intersect_rect(&(surface->gdi.invalidRegion), region16_intersect_rect(&(surface->gdi.invalidRegion),
&(surface->gdi.invalidRegion), &surfaceRect); &(surface->gdi.invalidRegion), &surfaceRect);
@ -215,12 +214,13 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
xfGfxSurface* surface; xfGfxSurface* surface;
rdpGdi* gdi = (rdpGdi*)context->custom; rdpGdi* gdi = (rdpGdi*)context->custom;
xfContext* xfc = (xfContext*) gdi->context; xfContext* xfc = (xfContext*) gdi->context;
surface = (xfGfxSurface*) calloc(1, sizeof(xfGfxSurface)); surface = (xfGfxSurface*) calloc(1, sizeof(xfGfxSurface));
if (!surface) if (!surface)
return CHANNEL_RC_NO_MEMORY; return CHANNEL_RC_NO_MEMORY;
surface->gdi.codecs = gdi->context->codecs; surface->gdi.codecs = gdi->context->codecs;
if (!surface->gdi.codecs) if (!surface->gdi.codecs)
{ {
WLog_ERR(TAG, "%s: global GDI codecs aren't set", __FUNCTION__); WLog_ERR(TAG, "%s: global GDI codecs aren't set", __FUNCTION__);
@ -250,13 +250,14 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
surface->gdi.scanline = surface->gdi.width * GetBytesPerPixel(surface->gdi.format); surface->gdi.scanline = surface->gdi.width * GetBytesPerPixel(surface->gdi.format);
surface->gdi.scanline = x11_pad_scanline(surface->gdi.scanline, xfc->scanline_pad); surface->gdi.scanline = x11_pad_scanline(surface->gdi.scanline, xfc->scanline_pad);
size = surface->gdi.scanline * surface->gdi.height; size = surface->gdi.scanline * surface->gdi.height;
surface->gdi.data = (BYTE*)_aligned_malloc(size, 16); surface->gdi.data = (BYTE*)_aligned_malloc(size, 16);
if (!surface->gdi.data) if (!surface->gdi.data)
{ {
WLog_ERR(TAG, "%s: unable to allocate GDI data", __FUNCTION__); WLog_ERR(TAG, "%s: unable to allocate GDI data", __FUNCTION__);
goto out_free; goto out_free;
} }
ZeroMemory(surface->gdi.data, size); ZeroMemory(surface->gdi.data, size);
if (AreColorFormatsEqualNoAlpha(gdi->dstFormat, surface->gdi.format)) if (AreColorFormatsEqualNoAlpha(gdi->dstFormat, surface->gdi.format))
@ -272,15 +273,15 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
surface->stageScanline = width * bytes; surface->stageScanline = width * bytes;
surface->stageScanline = x11_pad_scanline(surface->stageScanline, xfc->scanline_pad); surface->stageScanline = x11_pad_scanline(surface->stageScanline, xfc->scanline_pad);
size = surface->stageScanline * surface->gdi.height; size = surface->stageScanline * surface->gdi.height;
surface->stage = (BYTE*) _aligned_malloc(size, 16); surface->stage = (BYTE*) _aligned_malloc(size, 16);
if (!surface->stage) if (!surface->stage)
{ {
WLog_ERR(TAG, "%s: unable to allocate stage buffer", __FUNCTION__); WLog_ERR(TAG, "%s: unable to allocate stage buffer", __FUNCTION__);
goto out_free_gdidata; goto out_free_gdidata;
} }
ZeroMemory(surface->stage, size);
ZeroMemory(surface->stage, size);
surface->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, surface->image = XCreateImage(xfc->display, xfc->visual, xfc->depth,
ZPixmap, 0, (char*) surface->stage, ZPixmap, 0, (char*) surface->stage,
surface->gdi.width, surface->gdi.height, surface->gdi.width, surface->gdi.height,
@ -295,16 +296,16 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
surface->image->byte_order = LSBFirst; surface->image->byte_order = LSBFirst;
surface->image->bitmap_bit_order = LSBFirst; surface->image->bitmap_bit_order = LSBFirst;
surface->gdi.outputMapped = FALSE; surface->gdi.outputMapped = FALSE;
region16_init(&surface->gdi.invalidRegion); region16_init(&surface->gdi.invalidRegion);
if (context->SetSurfaceData(context, surface->gdi.surfaceId, (void*) surface) != CHANNEL_RC_OK) if (context->SetSurfaceData(context, surface->gdi.surfaceId, (void*) surface) != CHANNEL_RC_OK)
{ {
WLog_ERR(TAG, "%s: an error occurred during SetSurfaceData", __FUNCTION__); WLog_ERR(TAG, "%s: an error occurred during SetSurfaceData", __FUNCTION__);
goto error_set_surface_data; goto error_set_surface_data;
} }
return CHANNEL_RC_OK;
return CHANNEL_RC_OK;
error_set_surface_data: error_set_surface_data:
XFree(surface->image); XFree(surface->image);
error_surface_image: error_surface_image:

View File

@ -136,7 +136,6 @@ static UINT gdi_OutputUpdate(rdpGdi* gdi, gdiGfxSurface* surface)
} }
update->EndPaint(gdi->context); update->EndPaint(gdi->context);
region16_clear(&(surface->invalidRegion)); region16_clear(&(surface->invalidRegion));
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
@ -212,11 +211,12 @@ static UINT gdi_SurfaceCommand_Uncompressed(rdpGdi* gdi,
UINT status = CHANNEL_RC_OK; UINT status = CHANNEL_RC_OK;
gdiGfxSurface* surface; gdiGfxSurface* surface;
RECTANGLE_16 invalidRect; RECTANGLE_16 invalidRect;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
@ -231,7 +231,6 @@ static UINT gdi_SurfaceCommand_Uncompressed(rdpGdi* gdi,
invalidRect.bottom = cmd->bottom; invalidRect.bottom = cmd->bottom;
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect); &invalidRect);
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect); IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame) if (!gdi->inGfxFrame)
@ -257,17 +256,18 @@ static UINT gdi_SurfaceCommand_RemoteFX(rdpGdi* gdi,
REGION16 invalidRegion; REGION16 invalidRegion;
const RECTANGLE_16* rects; const RECTANGLE_16* rects;
UINT32 nrRects, x; UINT32 nrRects, x;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
rfx_context_set_pixel_format(surface->codecs->rfx, cmd->format); rfx_context_set_pixel_format(surface->codecs->rfx, cmd->format);
region16_init(&invalidRegion); region16_init(&invalidRegion);
if (!rfx_process_message(surface->codecs->rfx, cmd->data, cmd->length, if (!rfx_process_message(surface->codecs->rfx, cmd->data, cmd->length,
cmd->left, cmd->top, cmd->left, cmd->top,
surface->data, surface->format, surface->scanline, surface->data, surface->format, surface->scanline,
@ -285,6 +285,7 @@ static UINT gdi_SurfaceCommand_RemoteFX(rdpGdi* gdi,
region16_union_rect(&surface->invalidRegion, &surface->invalidRegion, &rects[x]); region16_union_rect(&surface->invalidRegion, &surface->invalidRegion, &rects[x]);
region16_uninit(&invalidRegion); region16_uninit(&invalidRegion);
if (!gdi->inGfxFrame) if (!gdi->inGfxFrame)
{ {
status = CHANNEL_RC_NOT_INITIALIZED; status = CHANNEL_RC_NOT_INITIALIZED;
@ -307,11 +308,12 @@ static UINT gdi_SurfaceCommand_ClearCodec(rdpGdi* gdi,
UINT status = CHANNEL_RC_OK; UINT status = CHANNEL_RC_OK;
gdiGfxSurface* surface; gdiGfxSurface* surface;
RECTANGLE_16 invalidRect; RECTANGLE_16 invalidRect;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
@ -333,7 +335,6 @@ static UINT gdi_SurfaceCommand_ClearCodec(rdpGdi* gdi,
invalidRect.bottom = cmd->bottom; invalidRect.bottom = cmd->bottom;
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect); &invalidRect);
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect); IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame) if (!gdi->inGfxFrame)
@ -357,11 +358,12 @@ static UINT gdi_SurfaceCommand_Planar(rdpGdi* gdi, RdpgfxClientContext* context,
BYTE* DstData = NULL; BYTE* DstData = NULL;
gdiGfxSurface* surface; gdiGfxSurface* surface;
RECTANGLE_16 invalidRect; RECTANGLE_16 invalidRect;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
@ -380,7 +382,6 @@ static UINT gdi_SurfaceCommand_Planar(rdpGdi* gdi, RdpgfxClientContext* context,
invalidRect.bottom = cmd->bottom; invalidRect.bottom = cmd->bottom;
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect); &invalidRect);
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect); IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame) if (!gdi->inGfxFrame)
@ -408,17 +409,19 @@ static UINT gdi_SurfaceCommand_AVC420(rdpGdi* gdi,
gdiGfxSurface* surface; gdiGfxSurface* surface;
RDPGFX_H264_METABLOCK* meta; RDPGFX_H264_METABLOCK* meta;
RDPGFX_AVC420_BITMAP_STREAM* bs; RDPGFX_AVC420_BITMAP_STREAM* bs;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
if (!surface->h264) if (!surface->h264)
{ {
surface->h264 = h264_context_new(FALSE); surface->h264 = h264_context_new(FALSE);
if (!surface->h264) if (!surface->h264)
{ {
WLog_ERR(TAG, "%s: unable to create h264 context", __FUNCTION__); WLog_ERR(TAG, "%s: unable to create h264 context", __FUNCTION__);
@ -430,6 +433,7 @@ static UINT gdi_SurfaceCommand_AVC420(rdpGdi* gdi,
} }
bs = (RDPGFX_AVC420_BITMAP_STREAM*) cmd->extra; bs = (RDPGFX_AVC420_BITMAP_STREAM*) cmd->extra;
if (!bs) if (!bs)
return ERROR_INTERNAL_ERROR; return ERROR_INTERNAL_ERROR;
@ -450,6 +454,7 @@ static UINT gdi_SurfaceCommand_AVC420(rdpGdi* gdi,
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
(RECTANGLE_16*) & (meta->regionRects[i])); (RECTANGLE_16*) & (meta->regionRects[i]));
} }
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
meta->numRegionRects, meta->regionRects); meta->numRegionRects, meta->regionRects);
@ -484,17 +489,19 @@ static UINT gdi_SurfaceCommand_AVC444(rdpGdi* gdi, RdpgfxClientContext* context,
RDPGFX_AVC420_BITMAP_STREAM* avc2; RDPGFX_AVC420_BITMAP_STREAM* avc2;
RDPGFX_H264_METABLOCK* meta2; RDPGFX_H264_METABLOCK* meta2;
RECTANGLE_16* regionRects = NULL; RECTANGLE_16* regionRects = NULL;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
if (!surface->h264) if (!surface->h264)
{ {
surface->h264 = h264_context_new(FALSE); surface->h264 = h264_context_new(FALSE);
if (!surface->h264) if (!surface->h264)
{ {
WLog_ERR(TAG, "%s: unable to create h264 context", __FUNCTION__); WLog_ERR(TAG, "%s: unable to create h264 context", __FUNCTION__);
@ -533,6 +540,7 @@ static UINT gdi_SurfaceCommand_AVC444(rdpGdi* gdi, RdpgfxClientContext* context,
{ {
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), &(meta1->regionRects[i])); region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), &(meta1->regionRects[i]));
} }
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
meta1->numRegionRects, meta1->regionRects); meta1->numRegionRects, meta1->regionRects);
@ -540,6 +548,7 @@ static UINT gdi_SurfaceCommand_AVC444(rdpGdi* gdi, RdpgfxClientContext* context,
{ {
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), &(meta2->regionRects[i])); region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), &(meta2->regionRects[i]));
} }
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
meta2->numRegionRects, meta2->regionRects); meta2->numRegionRects, meta2->regionRects);
@ -568,11 +577,12 @@ static UINT gdi_SurfaceCommand_Alpha(rdpGdi* gdi, RdpgfxClientContext* context,
UINT32 color; UINT32 color;
gdiGfxSurface* surface; gdiGfxSurface* surface;
RECTANGLE_16 invalidRect; RECTANGLE_16 invalidRect;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
@ -590,7 +600,6 @@ static UINT gdi_SurfaceCommand_Alpha(rdpGdi* gdi, RdpgfxClientContext* context,
invalidRect.bottom = cmd->bottom; invalidRect.bottom = cmd->bottom;
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect); &invalidRect);
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect); IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame) if (!gdi->inGfxFrame)
@ -617,17 +626,17 @@ static UINT gdi_SurfaceCommand_Progressive(rdpGdi* gdi,
REGION16 invalidRegion; REGION16 invalidRegion;
const RECTANGLE_16* rects; const RECTANGLE_16* rects;
UINT32 nrRects, x; UINT32 nrRects, x;
/** /**
* Note: Since this comes via a Wire-To-Surface-2 PDU the * Note: Since this comes via a Wire-To-Surface-2 PDU the
* cmd's top/left/right/bottom/width/height members are always zero! * cmd's top/left/right/bottom/width/height members are always zero!
* The update region is determined during decompression. * The update region is determined during decompression.
*/ */
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
if (!surface) if (!surface)
{ {
WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__, cmd->surfaceId); WLog_ERR(TAG, "%s: unable to retrieve surfaceData for surfaceId=%"PRIu32"", __FUNCTION__,
cmd->surfaceId);
return ERROR_NOT_FOUND; return ERROR_NOT_FOUND;
} }
@ -659,6 +668,7 @@ static UINT gdi_SurfaceCommand_Progressive(rdpGdi* gdi,
for (x = 0; x < nrRects; x++) for (x = 0; x < nrRects; x++)
region16_union_rect(&surface->invalidRegion, &surface->invalidRegion, &rects[x]); region16_union_rect(&surface->invalidRegion, &surface->invalidRegion, &rects[x]);
region16_uninit(&invalidRegion); region16_uninit(&invalidRegion);
if (!gdi->inGfxFrame) if (!gdi->inGfxFrame)
@ -886,6 +896,7 @@ static UINT gdi_SolidFill(RdpgfxClientContext* context,
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect); &invalidRect);
} }
IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
solidFill->fillRectCount, solidFill->fillRects); solidFill->fillRectCount, solidFill->fillRects);
@ -975,14 +986,14 @@ static UINT gdi_SurfaceToCache(RdpgfxClientContext* context,
const RECTANGLE_16* rect; const RECTANGLE_16* rect;
gdiGfxSurface* surface; gdiGfxSurface* surface;
gdiGfxCacheEntry* cacheEntry; gdiGfxCacheEntry* cacheEntry;
rect = &(surfaceToCache->rectSrc); rect = &(surfaceToCache->rectSrc);
surface = (gdiGfxSurface*) context->GetSurfaceData(context, surfaceToCache->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, surfaceToCache->surfaceId);
if (!surface) if (!surface)
return ERROR_INTERNAL_ERROR; return ERROR_INTERNAL_ERROR;
cacheEntry = (gdiGfxCacheEntry*) calloc(1, sizeof(gdiGfxCacheEntry)); cacheEntry = (gdiGfxCacheEntry*) calloc(1, sizeof(gdiGfxCacheEntry));
if (!cacheEntry) if (!cacheEntry)
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
@ -990,8 +1001,8 @@ static UINT gdi_SurfaceToCache(RdpgfxClientContext* context,
cacheEntry->height = (UINT32)(rect->bottom - rect->top); cacheEntry->height = (UINT32)(rect->bottom - rect->top);
cacheEntry->format = surface->format; cacheEntry->format = surface->format;
cacheEntry->scanline = gfx_align_scanline(cacheEntry->width * 4, 16); cacheEntry->scanline = gfx_align_scanline(cacheEntry->width * 4, 16);
cacheEntry->data = (BYTE*) calloc(cacheEntry->height, cacheEntry->scanline); cacheEntry->data = (BYTE*) calloc(cacheEntry->height, cacheEntry->scanline);
if (!cacheEntry->data) if (!cacheEntry->data)
{ {
free(cacheEntry); free(cacheEntry);
@ -1024,7 +1035,6 @@ static UINT gdi_CacheToSurface(RdpgfxClientContext* context,
gdiGfxCacheEntry* cacheEntry; gdiGfxCacheEntry* cacheEntry;
RECTANGLE_16 invalidRect; RECTANGLE_16 invalidRect;
rdpGdi* gdi = (rdpGdi*) context->custom; rdpGdi* gdi = (rdpGdi*) context->custom;
surface = (gdiGfxSurface*) context->GetSurfaceData(context, cacheToSurface->surfaceId); surface = (gdiGfxSurface*) context->GetSurfaceData(context, cacheToSurface->surfaceId);
cacheEntry = (gdiGfxCacheEntry*) context->GetCacheSlotData(context, cacheToSurface->cacheSlot); cacheEntry = (gdiGfxCacheEntry*) context->GetCacheSlotData(context, cacheToSurface->cacheSlot);