Removed gdi->codecs, unused.
authorArmin Novak <armin.novak@thincast.com>
Wed, 13 Jul 2016 14:06:59 +0000 (16:06 +0200)
committerArmin Novak <armin.novak@thincast.com>
Thu, 6 Oct 2016 11:43:00 +0000 (13:43 +0200)
client/X11/xf_client.c
include/freerdp/gdi/gdi.h
libfreerdp/gdi/gdi.c
libfreerdp/gdi/gfx.c
libfreerdp/gdi/graphics.c

index e87eefa..2170e47 100644 (file)
@@ -1900,7 +1900,6 @@ static BOOL xfreerdp_client_new(freerdp* instance, rdpContext* context)
        else
                xfc->format = PIXEL_FORMAT_RGBX32;
 
-       xfc->format = PIXEL_FORMAT_RGBX32;
        if (xfc->debug)
        {
                WLog_INFO(TAG, "Enabling X11 debug mode.");
index 66b259e..2ec7357 100644 (file)
@@ -286,7 +286,6 @@ struct rdp_gdi
        UINT32 dstFormat;
        UINT32 cursor_x;
        UINT32 cursor_y;
-       rdpCodecs* codecs;
 
        HGDI_DC hdc;
        gdiBitmap* primary;
index 842a1de..f0051a9 100644 (file)
@@ -483,7 +483,7 @@ static BOOL gdi_bitmap_update(rdpContext* context,
                {
                        if (bitsPerPixel < 32)
                        {
-                               if (!freerdp_client_codecs_prepare(gdi->codecs,
+                               if (!freerdp_client_codecs_prepare(codecs,
                                                              FREERDP_CODEC_INTERLEAVED,
                                                              gdi->width, gdi->height))
                                        return FALSE;
@@ -498,7 +498,7 @@ static BOOL gdi_bitmap_update(rdpContext* context,
                        }
                        else
                        {
-                               if (!freerdp_client_codecs_prepare(gdi->codecs,
+                               if (!freerdp_client_codecs_prepare(codecs,
                                                              FREERDP_CODEC_PLANAR,
                                                              gdi->width, gdi->height))
                                        return FALSE;
@@ -1063,7 +1063,7 @@ static BOOL gdi_surface_bits(rdpContext* context,
        {
                case RDP_CODEC_ID_REMOTEFX:
                        {
-                               if (!rfx_process_message(gdi->codecs->rfx, cmd->bitmapData,
+                               if (!rfx_process_message(context->codecs->rfx, cmd->bitmapData,
                                                         PIXEL_FORMAT_BGRX32,
                                                         cmd->bitmapDataLength,
                                                         0, 0,
@@ -1079,7 +1079,7 @@ static BOOL gdi_surface_bits(rdpContext* context,
 
                case RDP_CODEC_ID_NSCODEC:
                        {
-                               if (!nsc_process_message(gdi->codecs->nsc, cmd->bpp, cmd->width,
+                               if (!nsc_process_message(context->codecs->nsc, cmd->bpp, cmd->width,
                                                         cmd->height, cmd->bitmapData,
                                                         cmd->bitmapDataLength, gdi->primary_buffer,
                                                         gdi->dstFormat, gdi->stride, cmd->destLeft, cmd->destTop,
@@ -1255,7 +1255,6 @@ BOOL gdi_init_ex(freerdp* instance, UINT32 format, UINT32 stride, BYTE* buffer,
 
        instance->context->gdi = gdi;
        gdi->context = instance->context;
-       gdi->codecs = instance->context->codecs;
        gdi->width = instance->settings->DesktopWidth;
        gdi->height = instance->settings->DesktopHeight;
        gdi->dstFormat = format;
@@ -1279,11 +1278,7 @@ BOOL gdi_init_ex(freerdp* instance, UINT32 format, UINT32 stride, BYTE* buffer,
                        goto fail;
        }
 
-       gdi->codecs = codecs_new(gdi->context);
-       if (!gdi->codecs)
-               goto fail;
-
-       if (!freerdp_client_codecs_reset(gdi->codecs, FREERDP_CODEC_ALL, gdi->width,
+       if (!freerdp_client_codecs_reset(context->codecs, FREERDP_CODEC_ALL, gdi->width,
                                         gdi->height))
                goto fail;
 
@@ -1318,7 +1313,6 @@ void gdi_free(freerdp* instance)
        {
                gdi_bitmap_free_ex(gdi->primary);
                gdi_DeleteDC(gdi->hdc);
-               codecs_free(gdi->codecs);
                free(gdi);
        }
 
index e00373b..82ce7b2 100644 (file)
@@ -80,7 +80,7 @@ static UINT gdi_ResetGraphics(RdpgfxClientContext* context,
 
        free(pSurfaceIds);
 
-       if (!freerdp_client_codecs_reset(gdi->codecs, FREERDP_CODEC_ALL,
+       if (!freerdp_client_codecs_reset(gdi->context->codecs, FREERDP_CODEC_ALL,
                                         gdi->width, gdi->height))
                return ERROR_INTERNAL_ERROR;
 
index 94f59a6..024f068 100644 (file)
@@ -149,11 +149,11 @@ static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
        {
                if (bpp < 32)
                {
-                       if (!freerdp_client_codecs_prepare(gdi->codecs,
+                       if (!freerdp_client_codecs_prepare(context->codecs,
                                                      FREERDP_CODEC_INTERLEAVED,
                                                      gdi->width, gdi->height))
                                return FALSE;
-                       status = interleaved_decompress(gdi->codecs->interleaved,
+                       status = interleaved_decompress(context->codecs->interleaved,
                                                        pSrcData, SrcSize,
                                                        bpp,
                                                        pDstData, gdi->dstFormat,
@@ -162,11 +162,11 @@ static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
                }
                else
                {
-                       if (!freerdp_client_codecs_prepare(gdi->codecs,
+                       if (!freerdp_client_codecs_prepare(context->codecs,
                                                      FREERDP_CODEC_PLANAR,
                                                      gdi->width, gdi->height))
                                return FALSE;
-                       status = planar_decompress(gdi->codecs->planar, pSrcData, SrcSize,
+                       status = planar_decompress(context->codecs->planar, pSrcData, SrcSize,
                                                                           pDstData, gdi->dstFormat, 0, 0, 0,
                                                                           width, height, TRUE);
                }