Using a single codec context per session.
This commit is contained in:
parent
d1e0d44f22
commit
d4b823d5cb
@ -208,7 +208,7 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
|
||||
if (!surface)
|
||||
return CHANNEL_RC_NO_MEMORY;
|
||||
|
||||
surface->gdi.codecs = codecs_new(gdi->context);
|
||||
surface->gdi.codecs = gdi->context->codecs;
|
||||
|
||||
if (!surface->gdi.codecs)
|
||||
{
|
||||
@ -216,13 +216,6 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
|
||||
return CHANNEL_RC_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!freerdp_client_codecs_prepare(surface->gdi.codecs, FREERDP_CODEC_ALL,
|
||||
createSurface->width, createSurface->height))
|
||||
{
|
||||
free(surface);
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
surface->gdi.surfaceId = createSurface->surfaceId;
|
||||
surface->gdi.width = (UINT32) createSurface->width;
|
||||
surface->gdi.height = (UINT32) createSurface->height;
|
||||
@ -320,7 +313,6 @@ static UINT xf_DeleteSurface(RdpgfxClientContext* context,
|
||||
progressive_delete_surface_context(codecs->progressive,
|
||||
deleteSurface->surfaceId);
|
||||
|
||||
codecs_free(codecs);
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
|
@ -80,13 +80,6 @@ static UINT gdi_ResetGraphics(RdpgfxClientContext* context,
|
||||
if (!surface || !surface->outputMapped)
|
||||
continue;
|
||||
|
||||
if (!freerdp_client_codecs_reset(surface->codecs, FREERDP_CODEC_ALL,
|
||||
surface->width, surface->height))
|
||||
{
|
||||
free(pSurfaceIds);
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
region16_clear(&surface->invalidRegion);
|
||||
}
|
||||
|
||||
@ -258,6 +251,7 @@ static UINT gdi_SurfaceCommand_RemoteFX(rdpGdi* gdi,
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
|
||||
rfx_context_set_pixel_format(surface->codecs->rfx, cmd->format);
|
||||
|
||||
if (!rfx_process_message(surface->codecs->rfx, cmd->data, cmd->length,
|
||||
cmd->left, cmd->top,
|
||||
surface->data, surface->format, surface->scanline,
|
||||
@ -676,7 +670,7 @@ static UINT gdi_CreateSurface(RdpgfxClientContext* context,
|
||||
if (!surface)
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
|
||||
surface->codecs = codecs_new(gdi->context);
|
||||
surface->codecs = gdi->context->codecs;
|
||||
|
||||
if (!surface->codecs)
|
||||
{
|
||||
@ -684,13 +678,6 @@ static UINT gdi_CreateSurface(RdpgfxClientContext* context,
|
||||
return CHANNEL_RC_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!freerdp_client_codecs_prepare(surface->codecs, FREERDP_CODEC_ALL,
|
||||
createSurface->width, createSurface->height))
|
||||
{
|
||||
free(surface);
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
surface->surfaceId = createSurface->surfaceId;
|
||||
surface->width = (UINT32) createSurface->width;
|
||||
surface->height = (UINT32) createSurface->height;
|
||||
@ -752,7 +739,6 @@ static UINT gdi_DeleteSurface(RdpgfxClientContext* context,
|
||||
progressive_delete_surface_context(codecs->progressive,
|
||||
deleteSurface->surfaceId);
|
||||
|
||||
codecs_free(codecs);
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
@ -783,9 +769,7 @@ static UINT gdi_SolidFill(RdpgfxClientContext* context,
|
||||
g = solidFill->fillPixel.G;
|
||||
r = solidFill->fillPixel.R;
|
||||
a = solidFill->fillPixel.XA;
|
||||
color = GetColor(PIXEL_FORMAT_ARGB32, r, g, b, a);
|
||||
color = ConvertColor(color, PIXEL_FORMAT_ARGB32, surface->format,
|
||||
&gdi->palette);
|
||||
color = GetColor(surface->format, r, g, b, a);
|
||||
|
||||
for (index = 0; index < solidFill->fillRectCount; index++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user