[core,cache] make protocol caches private

most protocol internal caches do not need to be exposed. this reduces
the public API and allows us to more easily improve/change this during a
release cycle
This commit is contained in:
akallabeth
2023-02-07 15:42:52 +01:00
committed by akallabeth
parent 3293d0d06a
commit adce7378c3
31 changed files with 283 additions and 465 deletions

View File

@@ -10,7 +10,6 @@
#include <freerdp/gdi/dc.h>
#include <freerdp/gdi/gfx.h>
#include <freerdp/gdi/region.h>
#include <freerdp/cache/cache.h>
#include <freerdp/channels/channels.h>
#include <freerdp/client/channels.h>

View File

@@ -35,7 +35,6 @@
#include <freerdp/gdi/gdi.h>
#include <freerdp/gdi/dc.h>
#include <freerdp/gdi/region.h>
#include <freerdp/cache/cache.h>
#include <freerdp/codec/color.h>
#include <freerdp/client/rail.h>

View File

@@ -1260,11 +1260,6 @@ static BOOL xf_post_connect(freerdp* instance)
}
xf_gdi_register_update_callbacks(update);
brush_cache_register_callbacks(context->update);
glyph_cache_register_callbacks(context->update);
bitmap_cache_register_callbacks(context->update);
offscreen_cache_register_callbacks(context->update);
palette_cache_register_callbacks(context->update);
}
#ifdef WITH_XRENDER

View File

@@ -32,7 +32,7 @@
#include <freerdp/gdi/gdi.h>
#include <freerdp/gdi/dc.h>
#include <freerdp/gdi/region.h>
#include <freerdp/cache/cache.h>
#include <freerdp/channels/channels.h>
#ifdef __cplusplus

View File

@@ -1,70 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Bitmap Cache V2
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_BITMAP_V2_CACHE_H
#define FREERDP_BITMAP_V2_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/update.h>
#include <freerdp/freerdp.h>
#include <freerdp/cache/persistent.h>
#include <winpr/stream.h>
typedef struct
{
UINT32 number;
rdpBitmap** entries;
} BITMAP_V2_CELL;
typedef struct
{
pMemBlt MemBlt; /* 0 */
pMem3Blt Mem3Blt; /* 1 */
pCacheBitmap CacheBitmap; /* 2 */
pCacheBitmapV2 CacheBitmapV2; /* 3 */
pCacheBitmapV3 CacheBitmapV3; /* 4 */
pBitmapUpdate BitmapUpdate; /* 5 */
UINT32 paddingA[16 - 6]; /* 6 */
UINT32 maxCells; /* 16 */
BITMAP_V2_CELL* cells; /* 17 */
UINT32 paddingB[32 - 18]; /* 18 */
/* internal */
rdpContext* context;
rdpPersistentCache* persistent;
} rdpBitmapCache;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void bitmap_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpBitmapCache* bitmap_cache_new(rdpContext* context);
FREERDP_API void bitmap_cache_free(rdpBitmapCache* bitmap_cache);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_BITMAP_V2_CACHE_H */

View File

@@ -1,51 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Brush Cache
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_BRUSH_CACHE_H
#define FREERDP_BRUSH_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/freerdp.h>
#include <freerdp/update.h>
#include <winpr/stream.h>
typedef struct rdp_brush_cache rdpBrushCache;
#include <freerdp/cache/cache.h>
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void* brush_cache_get(rdpBrushCache* brush, UINT32 index, UINT32* bpp);
FREERDP_API void brush_cache_put(rdpBrushCache* brush, UINT32 index, void* entry, UINT32 bpp);
FREERDP_API void brush_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpBrushCache* brush_cache_new(rdpContext* context);
FREERDP_API void brush_cache_free(rdpBrushCache* brush);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_BRUSH_CACHE_H */

View File

@@ -1,60 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* RDP Caches
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_CACHE_H
#define FREERDP_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/update.h>
#include <winpr/stream.h>
#include <freerdp/cache/glyph.h>
#include <freerdp/cache/brush.h>
#include <freerdp/cache/pointer.h>
#include <freerdp/cache/bitmap.h>
#include <freerdp/cache/nine_grid.h>
#include <freerdp/cache/offscreen.h>
#include <freerdp/cache/palette.h>
struct rdp_cache
{
rdpGlyphCache* glyph; /* 0 */
rdpBrushCache* brush; /* 1 */
rdpPointerCache* pointer; /* 2 */
rdpBitmapCache* bitmap; /* 3 */
rdpOffscreenCache* offscreen; /* 4 */
rdpPaletteCache* palette; /* 5 */
rdpNineGridCache* nine_grid; /* 6 */
};
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API rdpCache* cache_new(rdpContext* context);
FREERDP_API void cache_free(rdpCache* cache);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CACHE_H */

View File

@@ -1,71 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Glyph Cache
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_GLYPH_CACHE_H
#define FREERDP_GLYPH_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/update.h>
#include <winpr/wlog.h>
#include <winpr/stream.h>
typedef struct
{
UINT32 number;
UINT32 maxCellSize;
rdpGlyph** entries;
} GLYPH_CACHE;
typedef struct
{
void* fragment;
UINT32 size;
} FRAGMENT_CACHE_ENTRY;
typedef struct
{
FRAGMENT_CACHE_ENTRY entries[256];
} FRAGMENT_CACHE;
typedef struct
{
FRAGMENT_CACHE fragCache;
GLYPH_CACHE glyphCache[10];
wLog* log;
rdpContext* context;
} rdpGlyphCache;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void glyph_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpGlyphCache* glyph_cache_new(rdpContext* context);
FREERDP_API void glyph_cache_free(rdpGlyphCache* glyph);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_GLYPH_CACHE_H */

View File

@@ -1,63 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Palette (Color Table) Cache
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_PALETTE_CACHE_H
#define FREERDP_PALETTE_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/update.h>
#include <freerdp/freerdp.h>
#include <winpr/stream.h>
typedef struct rdp_palette_cache rdpPaletteCache;
#include <freerdp/cache/cache.h>
typedef struct
{
void* entry;
} PALETTE_TABLE_ENTRY;
struct rdp_palette_cache
{
UINT32 maxEntries; /* 0 */
PALETTE_TABLE_ENTRY* entries; /* 1 */
/* internal */
rdpContext* context;
};
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void palette_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpPaletteCache* palette_cache_new(rdpContext* context);
FREERDP_API void palette_cache_free(rdpPaletteCache* palette_cache);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_PALETTE_CACHE_H */

View File

@@ -1,58 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Pointer Cache
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_POINTER_CACHE_H
#define FREERDP_POINTER_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/update.h>
#include <freerdp/freerdp.h>
#include <freerdp/graphics.h>
#include <winpr/stream.h>
typedef struct rdp_pointer_cache rdpPointerCache;
#include <freerdp/cache/cache.h>
struct rdp_pointer_cache
{
UINT32 cacheSize; /* 0 */
rdpPointer** entries; /* 1 */
/* internal */
rdpContext* context;
};
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void pointer_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpPointerCache* pointer_cache_new(rdpContext* context);
FREERDP_API void pointer_cache_free(rdpPointerCache* pointer_cache);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_POINTER_CACHE_H */

View File

@@ -27,7 +27,6 @@
#include <freerdp/api.h>
#include <freerdp/log.h>
#include <freerdp/freerdp.h>
#include <freerdp/cache/cache.h>
#include <freerdp/codec/color.h>
#include <freerdp/codec/region.h>

View File

@@ -27,7 +27,9 @@ freerdp_module_add(
bitmap.h
persistent.c
nine_grid.c
nine_grid.h
offscreen.c
offscreen.h
palette.c
palette.h
glyph.c

View File

@@ -29,13 +29,13 @@
#include <winpr/stream.h>
#include <freerdp/log.h>
#include <freerdp/cache/bitmap.h>
#include <freerdp/gdi/bitmap.h>
#include "../gdi/gdi.h"
#include "../core/graphics.h"
#include "bitmap.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.bitmap")

View File

@@ -23,19 +23,63 @@
#include <freerdp/api.h>
#include <freerdp/update.h>
FREERDP_LOCAL BITMAP_UPDATE* copy_bitmap_update(rdpContext* context, const BITMAP_UPDATE* pointer);
FREERDP_LOCAL void free_bitmap_update(rdpContext* context, BITMAP_UPDATE* pointer);
#include <freerdp/cache/persistent.h>
FREERDP_LOCAL CACHE_BITMAP_ORDER* copy_cache_bitmap_order(rdpContext* context,
const CACHE_BITMAP_ORDER* order);
FREERDP_LOCAL void free_cache_bitmap_order(rdpContext* context, CACHE_BITMAP_ORDER* order);
typedef struct
{
UINT32 number;
rdpBitmap** entries;
} BITMAP_V2_CELL;
FREERDP_LOCAL CACHE_BITMAP_V2_ORDER* copy_cache_bitmap_v2_order(rdpContext* context,
const CACHE_BITMAP_V2_ORDER* order);
FREERDP_LOCAL void free_cache_bitmap_v2_order(rdpContext* context, CACHE_BITMAP_V2_ORDER* order);
typedef struct
{
pMemBlt MemBlt; /* 0 */
pMem3Blt Mem3Blt; /* 1 */
pCacheBitmap CacheBitmap; /* 2 */
pCacheBitmapV2 CacheBitmapV2; /* 3 */
pCacheBitmapV3 CacheBitmapV3; /* 4 */
pBitmapUpdate BitmapUpdate; /* 5 */
UINT32 paddingA[16 - 6]; /* 6 */
FREERDP_LOCAL CACHE_BITMAP_V3_ORDER* copy_cache_bitmap_v3_order(rdpContext* context,
const CACHE_BITMAP_V3_ORDER* order);
FREERDP_LOCAL void free_cache_bitmap_v3_order(rdpContext* context, CACHE_BITMAP_V3_ORDER* order);
UINT32 maxCells; /* 16 */
BITMAP_V2_CELL* cells; /* 17 */
UINT32 paddingB[32 - 18]; /* 18 */
/* internal */
rdpContext* context;
rdpPersistentCache* persistent;
} rdpBitmapCache;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL void bitmap_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL rdpBitmapCache* bitmap_cache_new(rdpContext* context);
FREERDP_LOCAL void bitmap_cache_free(rdpBitmapCache* bitmap_cache);
FREERDP_LOCAL BITMAP_UPDATE* copy_bitmap_update(rdpContext* context,
const BITMAP_UPDATE* pointer);
FREERDP_LOCAL void free_bitmap_update(rdpContext* context, BITMAP_UPDATE* pointer);
FREERDP_LOCAL CACHE_BITMAP_ORDER* copy_cache_bitmap_order(rdpContext* context,
const CACHE_BITMAP_ORDER* order);
FREERDP_LOCAL void free_cache_bitmap_order(rdpContext* context, CACHE_BITMAP_ORDER* order);
FREERDP_LOCAL CACHE_BITMAP_V2_ORDER*
copy_cache_bitmap_v2_order(rdpContext* context, const CACHE_BITMAP_V2_ORDER* order);
FREERDP_LOCAL void free_cache_bitmap_v2_order(rdpContext* context,
CACHE_BITMAP_V2_ORDER* order);
FREERDP_LOCAL CACHE_BITMAP_V3_ORDER*
copy_cache_bitmap_v3_order(rdpContext* context, const CACHE_BITMAP_V3_ORDER* order);
FREERDP_LOCAL void free_cache_bitmap_v3_order(rdpContext* context,
CACHE_BITMAP_V3_ORDER* order);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_LIB_CACHE_BITMAP_H */

View File

@@ -28,9 +28,8 @@
#include <freerdp/freerdp.h>
#include <winpr/stream.h>
#include <freerdp/cache/brush.h>
#include "brush.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.brush")

View File

@@ -1,8 +1,8 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Brush Cache
*
* Copyright 2018 Armin Novak <armin.novak@thincast.com>
* Copyright 2018 Thincast Technologies GmbH
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,15 +17,37 @@
* limitations under the License.
*/
#ifndef FREERDP_LIB_CACHE_BRUSH_H
#define FREERDP_LIB_CACHE_BRUSH_H
#ifndef FREERDP_LIB_BRUSH_CACHE_H
#define FREERDP_LIB_BRUSH_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/freerdp.h>
#include <freerdp/pointer.h>
#include <freerdp/update.h>
FREERDP_LOCAL CACHE_BRUSH_ORDER* copy_cache_brush_order(rdpContext* context,
const CACHE_BRUSH_ORDER* order);
FREERDP_LOCAL void free_cache_brush_order(rdpContext* context, CACHE_BRUSH_ORDER* order);
#include <winpr/stream.h>
#endif /* FREERDP_LIB_CACHE_BRUSH_H */
typedef struct rdp_brush_cache rdpBrushCache;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL void* brush_cache_get(rdpBrushCache* brush, UINT32 index, UINT32* bpp);
FREERDP_LOCAL void brush_cache_put(rdpBrushCache* brush, UINT32 index, void* entry, UINT32 bpp);
FREERDP_LOCAL void brush_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL rdpBrushCache* brush_cache_new(rdpContext* context);
FREERDP_LOCAL void brush_cache_free(rdpBrushCache* brush);
FREERDP_LOCAL CACHE_BRUSH_ORDER* copy_cache_brush_order(rdpContext* context,
const CACHE_BRUSH_ORDER* order);
FREERDP_LOCAL void free_cache_brush_order(rdpContext* context, CACHE_BRUSH_ORDER* order);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_LIB_BRUSH_CACHE_H */

View File

@@ -23,8 +23,6 @@
#include <winpr/stream.h>
#include <freerdp/cache/cache.h>
#include "cache.h"
rdpCache* cache_new(rdpContext* context)

View File

@@ -24,13 +24,44 @@
#include <freerdp/freerdp.h>
#include <freerdp/pointer.h>
FREERDP_LOCAL CACHE_COLOR_TABLE_ORDER*
copy_cache_color_table_order(rdpContext* context, const CACHE_COLOR_TABLE_ORDER* order);
FREERDP_LOCAL void free_cache_color_table_order(rdpContext* context,
CACHE_COLOR_TABLE_ORDER* order);
#include "glyph.h"
#include "brush.h"
#include "pointer.h"
#include "bitmap.h"
#include "nine_grid.h"
#include "offscreen.h"
#include "palette.h"
FREERDP_LOCAL SURFACE_BITS_COMMAND* copy_surface_bits_command(rdpContext* context,
const SURFACE_BITS_COMMAND* order);
FREERDP_LOCAL void free_surface_bits_command(rdpContext* context, SURFACE_BITS_COMMAND* order);
struct rdp_cache
{
rdpGlyphCache* glyph; /* 0 */
rdpBrushCache* brush; /* 1 */
rdpPointerCache* pointer; /* 2 */
rdpBitmapCache* bitmap; /* 3 */
rdpOffscreenCache* offscreen; /* 4 */
rdpPaletteCache* palette; /* 5 */
rdpNineGridCache* nine_grid; /* 6 */
};
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL rdpCache* cache_new(rdpContext* context);
FREERDP_LOCAL void cache_free(rdpCache* cache);
FREERDP_LOCAL CACHE_COLOR_TABLE_ORDER*
copy_cache_color_table_order(rdpContext* context, const CACHE_COLOR_TABLE_ORDER* order);
FREERDP_LOCAL void free_cache_color_table_order(rdpContext* context,
CACHE_COLOR_TABLE_ORDER* order);
FREERDP_LOCAL SURFACE_BITS_COMMAND*
copy_surface_bits_command(rdpContext* context, const SURFACE_BITS_COMMAND* order);
FREERDP_LOCAL void free_surface_bits_command(rdpContext* context, SURFACE_BITS_COMMAND* order);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_LIB_CACHE_CACHE_H */

View File

@@ -28,10 +28,9 @@
#include <winpr/stream.h>
#include <freerdp/log.h>
#include <freerdp/cache/cache.h>
#include <freerdp/cache/glyph.h>
#include "glyph.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.glyph")

View File

@@ -24,12 +24,53 @@
#include <freerdp/freerdp.h>
#include <freerdp/pointer.h>
FREERDP_LOCAL CACHE_GLYPH_ORDER* copy_cache_glyph_order(rdpContext* context,
const CACHE_GLYPH_ORDER* glyph);
FREERDP_LOCAL void free_cache_glyph_order(rdpContext* context, CACHE_GLYPH_ORDER* glyph);
typedef struct
{
UINT32 number;
UINT32 maxCellSize;
rdpGlyph** entries;
} GLYPH_CACHE;
FREERDP_LOCAL CACHE_GLYPH_V2_ORDER* copy_cache_glyph_v2_order(rdpContext* context,
const CACHE_GLYPH_V2_ORDER* glyph);
FREERDP_LOCAL void free_cache_glyph_v2_order(rdpContext* context, CACHE_GLYPH_V2_ORDER* glyph);
typedef struct
{
void* fragment;
UINT32 size;
} FRAGMENT_CACHE_ENTRY;
typedef struct
{
FRAGMENT_CACHE_ENTRY entries[256];
} FRAGMENT_CACHE;
typedef struct
{
FRAGMENT_CACHE fragCache;
GLYPH_CACHE glyphCache[10];
wLog* log;
rdpContext* context;
} rdpGlyphCache;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL void glyph_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL rdpGlyphCache* glyph_cache_new(rdpContext* context);
FREERDP_LOCAL void glyph_cache_free(rdpGlyphCache* glyph);
FREERDP_LOCAL CACHE_GLYPH_ORDER* copy_cache_glyph_order(rdpContext* context,
const CACHE_GLYPH_ORDER* glyph);
FREERDP_LOCAL void free_cache_glyph_order(rdpContext* context, CACHE_GLYPH_ORDER* glyph);
FREERDP_LOCAL CACHE_GLYPH_V2_ORDER*
copy_cache_glyph_v2_order(rdpContext* context, const CACHE_GLYPH_V2_ORDER* glyph);
FREERDP_LOCAL void free_cache_glyph_v2_order(rdpContext* context, CACHE_GLYPH_V2_ORDER* glyph);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_LIB_CACHE_GLYPH_H */

View File

@@ -28,7 +28,8 @@
#include <freerdp/freerdp.h>
#include <winpr/stream.h>
#include <freerdp/cache/nine_grid.h>
#include "nine_grid.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.nine_grid")

View File

@@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_NINE_GRID_CACHE_H
#define FREERDP_NINE_GRID_CACHE_H
#ifndef FREERDP_LIB_NINE_GRID_CACHE_H
#define FREERDP_LIB_NINE_GRID_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
@@ -29,20 +29,20 @@
typedef struct rdp_nine_grid_cache rdpNineGridCache;
#include <freerdp/cache/cache.h>
#include "nine_grid.h"
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void nine_grid_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL void nine_grid_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpNineGridCache* nine_grid_cache_new(rdpContext* context);
FREERDP_API void nine_grid_cache_free(rdpNineGridCache* nine_grid);
FREERDP_LOCAL rdpNineGridCache* nine_grid_cache_new(rdpContext* context);
FREERDP_LOCAL void nine_grid_cache_free(rdpNineGridCache* nine_grid);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_NINE_GRID_CACHE_H */
#endif /* FREERDP_LIB_NINE_GRID_CACHE_H */

View File

@@ -26,11 +26,12 @@
#include <winpr/stream.h>
#include <freerdp/log.h>
#include <freerdp/cache/offscreen.h>
#include <freerdp/cache/cache.h>
#include "../core/graphics.h"
#include "offscreen.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.offscreen")
struct rdp_offscreen_cache

View File

@@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_OFFSCREEN_CACHE_H
#define FREERDP_OFFSCREEN_CACHE_H
#ifndef FREERDP_LIB_OFFSCREEN_CACHE_H
#define FREERDP_LIB_OFFSCREEN_CACHE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
@@ -34,15 +34,15 @@ extern "C"
{
#endif
FREERDP_API rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, UINT32 index);
FREERDP_LOCAL rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, UINT32 index);
FREERDP_API void offscreen_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL void offscreen_cache_register_callbacks(rdpUpdate* update);
FREERDP_API rdpOffscreenCache* offscreen_cache_new(rdpContext* context);
FREERDP_API void offscreen_cache_free(rdpOffscreenCache* offscreen);
FREERDP_LOCAL rdpOffscreenCache* offscreen_cache_new(rdpContext* context);
FREERDP_LOCAL void offscreen_cache_free(rdpOffscreenCache* offscreen);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_OFFSCREEN_CACHE_H */
#endif /* FREERDP_LIB_OFFSCREEN_CACHE_H */

View File

@@ -24,9 +24,9 @@
#include <winpr/crt.h>
#include <freerdp/log.h>
#include <freerdp/cache/palette.h>
#include "palette.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.palette")

View File

@@ -23,8 +23,39 @@
#include <freerdp/api.h>
#include <freerdp/update.h>
FREERDP_LOCAL PALETTE_UPDATE* copy_palette_update(rdpContext* context,
const PALETTE_UPDATE* pointer);
FREERDP_LOCAL void free_palette_update(rdpContext* context, PALETTE_UPDATE* pointer);
typedef struct rdp_palette_cache rdpPaletteCache;
typedef struct
{
void* entry;
} PALETTE_TABLE_ENTRY;
struct rdp_palette_cache
{
UINT32 maxEntries; /* 0 */
PALETTE_TABLE_ENTRY* entries; /* 1 */
/* internal */
rdpContext* context;
};
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL void palette_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL rdpPaletteCache* palette_cache_new(rdpContext* context);
FREERDP_LOCAL void palette_cache_free(rdpPaletteCache* palette_cache);
FREERDP_LOCAL PALETTE_UPDATE* copy_palette_update(rdpContext* context,
const PALETTE_UPDATE* pointer);
FREERDP_LOCAL void free_palette_update(rdpContext* context, PALETTE_UPDATE* pointer);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_LIB_CACHE_PALETTE_H */

View File

@@ -26,9 +26,9 @@
#include <winpr/stream.h>
#include <freerdp/log.h>
#include <freerdp/cache/pointer.h>
#include "pointer.h"
#include "cache.h"
#define TAG FREERDP_TAG("cache.pointer")

View File

@@ -24,29 +24,58 @@
#include <freerdp/freerdp.h>
#include <freerdp/pointer.h>
FREERDP_LOCAL POINTER_COLOR_UPDATE* copy_pointer_color_update(rdpContext* context,
const POINTER_COLOR_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_color_update(rdpContext* context, POINTER_COLOR_UPDATE* pointer);
typedef struct rdp_pointer_cache rdpPointerCache;
FREERDP_LOCAL POINTER_LARGE_UPDATE* copy_pointer_large_update(rdpContext* context,
const POINTER_LARGE_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_large_update(rdpContext* context, POINTER_LARGE_UPDATE* pointer);
struct rdp_pointer_cache
{
UINT32 cacheSize; /* 0 */
rdpPointer** entries; /* 1 */
FREERDP_LOCAL POINTER_NEW_UPDATE* copy_pointer_new_update(rdpContext* context,
const POINTER_NEW_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_new_update(rdpContext* context, POINTER_NEW_UPDATE* pointer);
/* internal */
rdpContext* context;
};
FREERDP_LOCAL POINTER_CACHED_UPDATE*
copy_pointer_cached_update(rdpContext* context, const POINTER_CACHED_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_cached_update(rdpContext* context, POINTER_CACHED_UPDATE* pointer);
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL POINTER_POSITION_UPDATE*
copy_pointer_position_update(rdpContext* context, const POINTER_POSITION_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_position_update(rdpContext* context,
POINTER_POSITION_UPDATE* pointer);
FREERDP_LOCAL void pointer_cache_register_callbacks(rdpUpdate* update);
FREERDP_LOCAL POINTER_SYSTEM_UPDATE*
copy_pointer_system_update(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_system_update(rdpContext* context, POINTER_SYSTEM_UPDATE* pointer);
FREERDP_LOCAL rdpPointerCache* pointer_cache_new(rdpContext* context);
FREERDP_LOCAL void pointer_cache_free(rdpPointerCache* pointer_cache);
FREERDP_LOCAL POINTER_COLOR_UPDATE*
copy_pointer_color_update(rdpContext* context, const POINTER_COLOR_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_color_update(rdpContext* context,
POINTER_COLOR_UPDATE* pointer);
FREERDP_LOCAL POINTER_LARGE_UPDATE*
copy_pointer_large_update(rdpContext* context, const POINTER_LARGE_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_large_update(rdpContext* context,
POINTER_LARGE_UPDATE* pointer);
FREERDP_LOCAL POINTER_NEW_UPDATE* copy_pointer_new_update(rdpContext* context,
const POINTER_NEW_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_new_update(rdpContext* context, POINTER_NEW_UPDATE* pointer);
FREERDP_LOCAL POINTER_CACHED_UPDATE*
copy_pointer_cached_update(rdpContext* context, const POINTER_CACHED_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_cached_update(rdpContext* context,
POINTER_CACHED_UPDATE* pointer);
FREERDP_LOCAL POINTER_POSITION_UPDATE*
copy_pointer_position_update(rdpContext* context, const POINTER_POSITION_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_position_update(rdpContext* context,
POINTER_POSITION_UPDATE* pointer);
FREERDP_LOCAL POINTER_SYSTEM_UPDATE*
copy_pointer_system_update(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer);
FREERDP_LOCAL void free_pointer_system_update(rdpContext* context,
POINTER_SYSTEM_UPDATE* pointer);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_LIB_CACHE_POINTER_H */

View File

@@ -38,8 +38,8 @@
#include <freerdp/log.h>
#include <freerdp/error.h>
#include <freerdp/listener.h>
#include <freerdp/cache/pointer.h>
#include "../cache/pointer.h"
#include "../crypto/crypto.h"
#include "../crypto/privatekey.h"
#include "../crypto/certificate.h"

View File

@@ -51,9 +51,9 @@
#include <freerdp/channels/channels.h>
#include <freerdp/version.h>
#include <freerdp/log.h>
#include <freerdp/cache/pointer.h>
#include <freerdp/utils/signal.h>
#include "../cache/pointer.h"
#include "settings.h"
#include "utils.h"

View File

@@ -45,6 +45,7 @@
#include "gdi.h"
#include "../core/graphics.h"
#include "../core/update.h"
#include "../cache/cache.h"
#define TAG FREERDP_TAG("gdi")