25 |
#define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0) |
#define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0) |
26 |
|
|
27 |
extern int g_server_depth; |
extern int g_server_depth; |
28 |
extern BOOL g_bitmap_cache; |
extern RD_BOOL g_bitmap_cache; |
29 |
extern BOOL g_bitmap_cache_persist_enable; |
extern RD_BOOL g_bitmap_cache_persist_enable; |
30 |
extern BOOL g_bitmap_cache_precache; |
extern RD_BOOL g_bitmap_cache_precache; |
31 |
|
|
32 |
int g_pstcache_fd[8]; |
int g_pstcache_fd[8]; |
33 |
int g_pstcache_Bpp; |
int g_pstcache_Bpp; |
34 |
BOOL g_pstcache_enumerated = False; |
RD_BOOL g_pstcache_enumerated = False; |
35 |
uint8 zero_key[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; |
uint8 zero_key[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; |
36 |
|
|
37 |
|
|
50 |
} |
} |
51 |
|
|
52 |
/* Load a bitmap from the persistent cache */ |
/* Load a bitmap from the persistent cache */ |
53 |
BOOL |
RD_BOOL |
54 |
pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx) |
pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx) |
55 |
{ |
{ |
56 |
uint8 *celldata; |
uint8 *celldata; |
79 |
} |
} |
80 |
|
|
81 |
/* Store a bitmap in the persistent cache */ |
/* Store a bitmap in the persistent cache */ |
82 |
BOOL |
RD_BOOL |
83 |
pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * key, |
pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * key, |
84 |
uint8 width, uint8 height, uint16 length, uint8 * data) |
uint8 width, uint8 height, uint16 length, uint8 * data) |
85 |
{ |
{ |
160 |
} |
} |
161 |
|
|
162 |
/* initialise the persistent bitmap cache */ |
/* initialise the persistent bitmap cache */ |
163 |
BOOL |
RD_BOOL |
164 |
pstcache_init(uint8 cache_id) |
pstcache_init(uint8 cache_id) |
165 |
{ |
{ |
166 |
int fd; |
int fd; |