Fixed missing static for functions, fixed declaration of FreeRDPAreColorFormatsEqualNoAlpha

This commit is contained in:
Armin Novak 2022-06-20 15:54:46 +02:00 committed by David Fort
parent 56d10c2d27
commit 66e73f8b08
9 changed files with 24 additions and 31 deletions

View File

@ -315,7 +315,7 @@ static UINT xf_CreateSurface(RdpgfxClientContext* context,
ZeroMemory(surface->gdi.data, size);
if (AreColorFormatsEqualNoAlpha(gdi->dstFormat, surface->gdi.format))
if (FreeRDPAreColorFormatsEqualNoAlpha(gdi->dstFormat, surface->gdi.format))
{
surface->image =
XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,

View File

@ -103,11 +103,7 @@ extern "C"
/* Compare two color formats but ignore differences in alpha channel.
*/
static INLINE DWORD AreColorFormatsEqualNoAlpha(DWORD first, DWORD second)
{
const DWORD mask = (DWORD) ~(8UL << 12UL);
return (first & mask) == (second & mask);
}
FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second);
/* Color Space Conversions: http://msdn.microsoft.com/en-us/library/ff566496/ */

View File

@ -282,7 +282,7 @@ void bitmap_cache_register_callbacks(rdpUpdate* update)
}
}
int bitmap_cache_save_persistent(rdpBitmapCache* bitmapCache)
static int bitmap_cache_save_persistent(rdpBitmapCache* bitmapCache)
{
int status;
UINT32 i, j;

View File

@ -51,7 +51,8 @@ int persistent_cache_get_count(rdpPersistentCache* persistent)
return persistent->count;
}
int persistent_cache_read_entry_v2(rdpPersistentCache* persistent, PERSISTENT_CACHE_ENTRY* entry)
static int persistent_cache_read_entry_v2(rdpPersistentCache* persistent,
PERSISTENT_CACHE_ENTRY* entry)
{
PERSISTENT_CACHE_ENTRY_V2 entry2;
@ -72,7 +73,8 @@ int persistent_cache_read_entry_v2(rdpPersistentCache* persistent, PERSISTENT_CA
return 1;
}
int persistent_cache_write_entry_v2(rdpPersistentCache* persistent, const PERSISTENT_CACHE_ENTRY* entry)
static int persistent_cache_write_entry_v2(rdpPersistentCache* persistent,
const PERSISTENT_CACHE_ENTRY* entry)
{
int padding;
PERSISTENT_CACHE_ENTRY_V2 entry2;
@ -105,7 +107,7 @@ int persistent_cache_write_entry_v2(rdpPersistentCache* persistent, const PERSIS
return 1;
}
int persistent_cache_read_v2(rdpPersistentCache* persistent)
static int persistent_cache_read_v2(rdpPersistentCache* persistent)
{
PERSISTENT_CACHE_ENTRY_V2 entry;
@ -123,7 +125,8 @@ int persistent_cache_read_v2(rdpPersistentCache* persistent)
return 1;
}
int persistent_cache_read_entry_v3(rdpPersistentCache* persistent, PERSISTENT_CACHE_ENTRY* entry)
static int persistent_cache_read_entry_v3(rdpPersistentCache* persistent,
PERSISTENT_CACHE_ENTRY* entry)
{
PERSISTENT_CACHE_ENTRY_V3 entry3;
@ -159,7 +162,8 @@ int persistent_cache_read_entry_v3(rdpPersistentCache* persistent, PERSISTENT_CA
return 1;
}
int persistent_cache_write_entry_v3(rdpPersistentCache* persistent, const PERSISTENT_CACHE_ENTRY* entry)
static int persistent_cache_write_entry_v3(rdpPersistentCache* persistent,
const PERSISTENT_CACHE_ENTRY* entry)
{
PERSISTENT_CACHE_ENTRY_V3 entry3;
@ -178,7 +182,7 @@ int persistent_cache_write_entry_v3(rdpPersistentCache* persistent, const PERSIS
return 1;
}
int persistent_cache_read_v3(rdpPersistentCache* persistent)
static int persistent_cache_read_v3(rdpPersistentCache* persistent)
{
PERSISTENT_CACHE_ENTRY_V3 entry;
@ -216,7 +220,7 @@ int persistent_cache_write_entry(rdpPersistentCache* persistent, const PERSISTEN
return -1;
}
int persistent_cache_open_read(rdpPersistentCache* persistent)
static int persistent_cache_open_read(rdpPersistentCache* persistent)
{
BYTE sig[8];
int status = 1;
@ -256,7 +260,7 @@ int persistent_cache_open_read(rdpPersistentCache* persistent)
return status;
}
int persistent_cache_open_write(rdpPersistentCache* persistent)
static int persistent_cache_open_write(rdpPersistentCache* persistent)
{
PERSISTENT_CACHE_HEADER_V3 header;
@ -339,4 +343,4 @@ void persistent_cache_free(rdpPersistentCache* persistent)
free(persistent->bmpData);
free(persistent);
}
}

View File

@ -82,7 +82,7 @@ static const UINT32 CLEAR_LOG2_FLOOR[256] = {
static const BYTE CLEAR_8BIT_MASKS[9] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF };
void clear_reset_vbar_storage(CLEAR_CONTEXT* clear, BOOL zero)
static void clear_reset_vbar_storage(CLEAR_CONTEXT* clear, BOOL zero)
{
int i;
@ -105,7 +105,7 @@ void clear_reset_vbar_storage(CLEAR_CONTEXT* clear, BOOL zero)
clear->ShortVBarStorageCursor = 0;
}
void clear_reset_glyph_cache(CLEAR_CONTEXT* clear)
static void clear_reset_glyph_cache(CLEAR_CONTEXT* clear)
{
int i;

View File

@ -617,7 +617,7 @@ BOOL freerdp_image_copy(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32
srcVMultiplier = -1;
}
if (AreColorFormatsEqualNoAlpha(SrcFormat, DstFormat))
if (FreeRDPAreColorFormatsEqualNoAlpha(SrcFormat, DstFormat))
{
INT32 y;

View File

@ -276,7 +276,7 @@ static BOOL rdp_write_client_persistent_key_list_pdu(wStream* s, RDP_BITMAP_PERS
return TRUE;
}
UINT32 rdp_load_persistent_key_list(rdpRdp* rdp, UINT64** pKeyList)
static UINT32 rdp_load_persistent_key_list(rdpRdp* rdp, UINT64** pKeyList)
{
int index;
int count;

View File

@ -31,13 +31,6 @@
#include "../core/rdp.h"
char* utils_str_append(char* buffer, size_t size, const char* what)
{
if (!winpr_str_append(what, buffer, size, "|"))
return NULL;
return buffer;
}
BOOL utils_str_copy(const char* value, char** dst)
{
WINPR_ASSERT(dst);

View File

@ -1489,8 +1489,8 @@ static UINT gdi_CacheImportReply(RdpgfxClientContext* context,
return error;
}
UINT gdi_ImportCacheEntry(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* importCacheEntry)
static UINT gdi_ImportCacheEntry(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* importCacheEntry)
{
UINT error;
gdiGfxCacheEntry* cacheEntry;
@ -1530,8 +1530,8 @@ UINT gdi_ImportCacheEntry(RdpgfxClientContext* context, UINT16 cacheSlot,
return error;
}
UINT gdi_ExportCacheEntry(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* exportCacheEntry)
static UINT gdi_ExportCacheEntry(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* exportCacheEntry)
{
gdiGfxCacheEntry* cacheEntry;