&(surface->invalidRegion), &surfaceRect);
if (!(rects = region16_rects(&surface->invalidRegion, &nbRects)) || !nbRects)
- return CHANNEL_RC_OK;
+ return CHANNEL_RC_OK;
update->BeginPaint(gdi->context);
}
update->EndPaint(gdi->context);
+
region16_clear(&(surface->invalidRegion));
return CHANNEL_RC_OK;
}
UINT status = CHANNEL_RC_OK;
gdiGfxSurface* surface;
RECTANGLE_16 invalidRect;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
{
UINT status = CHANNEL_RC_OK;
gdiGfxSurface* surface;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ REGION16 invalidRegion;
+ const RECTANGLE_16* rects;
+ UINT32 nrRects, x;
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
rfx_context_set_pixel_format(surface->codecs->rfx, cmd->format);
+ region16_init(&invalidRegion);
if (!rfx_process_message(surface->codecs->rfx, cmd->data, cmd->length,
cmd->left, cmd->top,
surface->data, surface->format, surface->scanline,
- surface->height, &surface->invalidRegion))
+ surface->height, &invalidRegion))
{
WLog_ERR(TAG, "Failed to process RemoteFX message");
+ region16_uninit(&invalidRegion);
return ERROR_INTERNAL_ERROR;
}
+ rects = region16_rects(&invalidRegion, &nrRects);
+ region16_uninit(&invalidRegion);
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, nrRects, rects);
+
+ for (x=0; x<nrRects; x++)
+ region16_union_rect(&surface->invalidRegion, &surface->invalidRegion, &rects[x]);
if (!gdi->inGfxFrame)
{
status = CHANNEL_RC_NOT_INITIALIZED;
UINT status = CHANNEL_RC_OK;
gdiGfxSurface* surface;
RECTANGLE_16 invalidRect;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
invalidRect.bottom = cmd->bottom;
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect);
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame)
{
BYTE* DstData = NULL;
gdiGfxSurface* surface;
RECTANGLE_16 invalidRect;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
invalidRect.bottom = cmd->bottom;
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect);
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame)
{
gdiGfxSurface* surface;
RDPGFX_H264_METABLOCK* meta;
RDPGFX_AVC420_BITMAP_STREAM* bs;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
(RECTANGLE_16*) & (meta->regionRects[i]));
}
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
+ meta->numRegionRects, meta->regionRects);
if (!gdi->inGfxFrame)
{
RDPGFX_AVC420_BITMAP_STREAM* avc2;
RDPGFX_H264_METABLOCK* meta2;
RECTANGLE_16* regionRects = NULL;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
&(surface->invalidRegion),
&(meta1->regionRects[i]));
}
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
+ meta1->numRegionRects, meta1->regionRects);
for (i = 0; i < meta2->numRegionRects; i++)
{
&(surface->invalidRegion),
&(meta2->regionRects[i]));
}
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId,
+ meta2->numRegionRects, meta2->regionRects);
if (!gdi->inGfxFrame)
{
UINT32 color;
gdiGfxSurface* surface;
RECTANGLE_16 invalidRect;
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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;
}
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
&invalidRect);
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, 1, &invalidRect);
if (!gdi->inGfxFrame)
{
status = CHANNEL_RC_NOT_INITIALIZED;
INT32 rc;
UINT status = CHANNEL_RC_OK;
gdiGfxSurface* surface;
+ REGION16 invalidRegion;
+ const RECTANGLE_16* rects;
+ UINT32 nrRects, x;
+
/**
* Note: Since this comes via a Wire-To-Surface-2 PDU the
* cmd's top/left/right/bottom/width/height members are always zero!
* The update region is determined during decompression.
*/
- surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
+ surface = (gdiGfxSurface*) context->GetSurfaceData(context, cmd->surfaceId);
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_INTERNAL_ERROR;
}
+ region16_init(&invalidRegion);
rc = progressive_decompress(surface->codecs->progressive, cmd->data,
cmd->length, surface->data, surface->format,
surface->scanline, cmd->left, cmd->top,
- &surface->invalidRegion, cmd->surfaceId);
+ &invalidRegion, cmd->surfaceId);
if (rc < 0)
{
WLog_ERR(TAG, "progressive_decompress failure: %"PRId32"", rc);
+ region16_uninit(&invalidRegion);
return ERROR_INTERNAL_ERROR;
}
+ rects = region16_rects(&invalidRegion, &nrRects);
+ region16_uninit(&invalidRegion);
+ IFCALL(context->UpdateSurfaceArea, context, surface->surfaceId, nrRects, rects);
+
+ for (x=0; x<nrRects; x++)
+ region16_union_rect(&surface->invalidRegion, &surface->invalidRegion, &rects[x]);
if (!gdi->inGfxFrame)
{
status = gdi_SurfaceCommand_AVC420(gdi, context, cmd);
break;
- case RDPGFX_CODECID_AVC444v2:
case RDPGFX_CODECID_AVC444:
status = gdi_SurfaceCommand_AVC444(gdi, context, cmd);
break;