Removed unused function.

This commit is contained in:
Armin Novak 2016-10-10 11:33:31 +02:00
parent eecc4b189f
commit fa71427c6b
1 changed files with 36 additions and 40 deletions

View File

@ -39,16 +39,12 @@
#define TAG FREERDP_TAG("cache.bitmap")
static rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmapCache, UINT32 id,
UINT32 index);
UINT32 index);
static BOOL bitmap_cache_put(rdpBitmapCache* bitmap_cache, UINT32 id,
UINT32 index, rdpBitmap* bitmap);
static void bitmap_free(rdpContext* context, rdpBitmap* bitmap)
{
}
UINT32 index, rdpBitmap* bitmap);
static BOOL update_gdi_memblt(rdpContext* context,
MEMBLT_ORDER* memblt)
MEMBLT_ORDER* memblt)
{
rdpBitmap* bitmap;
rdpCache* cache = context->cache;
@ -57,7 +53,7 @@ static BOOL update_gdi_memblt(rdpContext* context,
bitmap = offscreen_cache_get(cache->offscreen, memblt->cacheIndex);
else
bitmap = bitmap_cache_get(cache->bitmap, (BYTE) memblt->cacheId,
memblt->cacheIndex);
memblt->cacheIndex);
/* XP-SP2 servers sometimes ask for cached bitmaps they've never defined. */
if (bitmap == NULL)
@ -68,7 +64,7 @@ static BOOL update_gdi_memblt(rdpContext* context,
}
static BOOL update_gdi_mem3blt(rdpContext* context,
MEM3BLT_ORDER* mem3blt)
MEM3BLT_ORDER* mem3blt)
{
BYTE style;
rdpBitmap* bitmap;
@ -80,7 +76,7 @@ static BOOL update_gdi_mem3blt(rdpContext* context,
bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex);
else
bitmap = bitmap_cache_get(cache->bitmap, (BYTE) mem3blt->cacheId,
mem3blt->cacheIndex);
mem3blt->cacheIndex);
/* XP-SP2 servers sometimes ask for cached bitmaps they've never defined. */
if (!bitmap)
@ -105,7 +101,7 @@ static BOOL update_gdi_mem3blt(rdpContext* context,
}
static BOOL update_gdi_cache_bitmap(rdpContext* context,
const CACHE_BITMAP_ORDER* cacheBitmap)
const CACHE_BITMAP_ORDER* cacheBitmap)
{
rdpBitmap* bitmap;
rdpBitmap* prevBitmap;
@ -116,13 +112,13 @@ static BOOL update_gdi_cache_bitmap(rdpContext* context,
return FALSE;
Bitmap_SetDimensions(bitmap, cacheBitmap->bitmapWidth,
cacheBitmap->bitmapHeight);
cacheBitmap->bitmapHeight);
if (!bitmap->Decompress(context, bitmap,
cacheBitmap->bitmapDataStream, cacheBitmap->bitmapWidth,
cacheBitmap->bitmapHeight,
cacheBitmap->bitmapBpp, cacheBitmap->bitmapLength,
cacheBitmap->compressed, RDP_CODEC_ID_NONE))
cacheBitmap->bitmapDataStream, cacheBitmap->bitmapWidth,
cacheBitmap->bitmapHeight,
cacheBitmap->bitmapBpp, cacheBitmap->bitmapLength,
cacheBitmap->compressed, RDP_CODEC_ID_NONE))
{
Bitmap_Free(context, bitmap);
return FALSE;
@ -135,15 +131,15 @@ static BOOL update_gdi_cache_bitmap(rdpContext* context,
}
prevBitmap = bitmap_cache_get(cache->bitmap, cacheBitmap->cacheId,
cacheBitmap->cacheIndex);
cacheBitmap->cacheIndex);
Bitmap_Free(context, prevBitmap);
return bitmap_cache_put(cache->bitmap, cacheBitmap->cacheId,
cacheBitmap->cacheIndex,
bitmap);
cacheBitmap->cacheIndex,
bitmap);
}
static BOOL update_gdi_cache_bitmap_v2(rdpContext* context,
CACHE_BITMAP_V2_ORDER* cacheBitmapV2)
CACHE_BITMAP_V2_ORDER* cacheBitmapV2)
{
rdpBitmap* bitmap;
@ -162,23 +158,23 @@ static BOOL update_gdi_cache_bitmap_v2(rdpContext* context,
cacheBitmapV2->bitmapBpp = settings->ColorDepth;
Bitmap_SetDimensions(bitmap, cacheBitmapV2->bitmapWidth,
cacheBitmapV2->bitmapHeight);
cacheBitmapV2->bitmapHeight);
if (!bitmap->Decompress(context, bitmap,
cacheBitmapV2->bitmapDataStream,
cacheBitmapV2->bitmapWidth,
cacheBitmapV2->bitmapHeight,
cacheBitmapV2->bitmapBpp,
cacheBitmapV2->bitmapLength,
cacheBitmapV2->compressed,
RDP_CODEC_ID_NONE))
cacheBitmapV2->bitmapDataStream,
cacheBitmapV2->bitmapWidth,
cacheBitmapV2->bitmapHeight,
cacheBitmapV2->bitmapBpp,
cacheBitmapV2->bitmapLength,
cacheBitmapV2->compressed,
RDP_CODEC_ID_NONE))
{
Bitmap_Free(context, bitmap);
return FALSE;
}
prevBitmap = bitmap_cache_get(cache->bitmap, cacheBitmapV2->cacheId,
cacheBitmapV2->cacheIndex);
cacheBitmapV2->cacheIndex);
if (!bitmap->New(context, bitmap))
{
@ -188,11 +184,11 @@ static BOOL update_gdi_cache_bitmap_v2(rdpContext* context,
Bitmap_Free(context, prevBitmap);
return bitmap_cache_put(cache->bitmap, cacheBitmapV2->cacheId,
cacheBitmapV2->cacheIndex, bitmap);
cacheBitmapV2->cacheIndex, bitmap);
}
static BOOL update_gdi_cache_bitmap_v3(rdpContext* context,
CACHE_BITMAP_V3_ORDER* cacheBitmapV3)
CACHE_BITMAP_V3_ORDER* cacheBitmapV3)
{
rdpBitmap* bitmap;
rdpBitmap* prevBitmap;
@ -212,9 +208,9 @@ static BOOL update_gdi_cache_bitmap_v3(rdpContext* context,
Bitmap_SetDimensions(bitmap, bitmapData->width, bitmapData->height);
if (!bitmap->Decompress(context, bitmap,
bitmapData->data, bitmapData->width, bitmapData->height,
bitmapData->bpp, bitmapData->length, compressed,
bitmapData->codecID))
bitmapData->data, bitmapData->width, bitmapData->height,
bitmapData->bpp, bitmapData->length, compressed,
bitmapData->codecID))
{
Bitmap_Free(context, bitmap);
return FALSE;
@ -227,14 +223,14 @@ static BOOL update_gdi_cache_bitmap_v3(rdpContext* context,
}
prevBitmap = bitmap_cache_get(cache->bitmap, cacheBitmapV3->cacheId,
cacheBitmapV3->cacheIndex);
cacheBitmapV3->cacheIndex);
Bitmap_Free(context, prevBitmap);
return bitmap_cache_put(cache->bitmap, cacheBitmapV3->cacheId,
cacheBitmapV3->cacheIndex, bitmap);
cacheBitmapV3->cacheIndex, bitmap);
}
rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmapCache, UINT32 id,
UINT32 index)
UINT32 index)
{
rdpBitmap* bitmap;
@ -259,7 +255,7 @@ rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmapCache, UINT32 id,
}
BOOL bitmap_cache_put(rdpBitmapCache* bitmapCache, UINT32 id, UINT32 index,
rdpBitmap* bitmap)
rdpBitmap* bitmap)
{
if (id > bitmapCache->maxCells)
{
@ -308,7 +304,7 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
bitmapCache->context = bitmapCache->update->context;
bitmapCache->maxCells = settings->BitmapCacheV2NumCells;
bitmapCache->cells = (BITMAP_V2_CELL*) calloc(bitmapCache->maxCells,
sizeof(BITMAP_V2_CELL));
sizeof(BITMAP_V2_CELL));
if (!bitmapCache->cells)
goto fail;
@ -318,7 +314,7 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
bitmapCache->cells[i].number = settings->BitmapCacheV2CellInfo[i].numEntries;
/* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */
bitmapCache->cells[i].entries = (rdpBitmap**) calloc((
bitmapCache->cells[i].number + 1), sizeof(rdpBitmap*));
bitmapCache->cells[i].number + 1), sizeof(rdpBitmap*));
if (!bitmapCache->cells[i].entries)
goto fail;