24 |
|
|
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_bpp; |
extern int g_server_depth; |
28 |
extern BOOL g_bitmap_cache; |
extern BOOL g_bitmap_cache; |
29 |
extern BOOL g_bitmap_cache_persist_enable; |
extern BOOL g_bitmap_cache_persist_enable; |
30 |
extern BOOL g_bitmap_cache_precache; |
extern BOOL g_bitmap_cache_precache; |
131 |
{ |
{ |
132 |
memcpy(keylist[idx], cellhdr.key, sizeof(HASH_KEY)); |
memcpy(keylist[idx], cellhdr.key, sizeof(HASH_KEY)); |
133 |
|
|
134 |
/* Pre-cache (not possible for 8bpp because 8bpp needs a colourmap) */ |
/* Pre-cache (not possible for 8 bit colour depth cause it needs a colourmap) */ |
135 |
if (g_bitmap_cache_precache && cellhdr.stamp && g_server_bpp > 8) |
if (g_bitmap_cache_precache && cellhdr.stamp && g_server_depth > 8) |
136 |
pstcache_load_bitmap(id, idx); |
pstcache_load_bitmap(id, idx); |
137 |
|
|
138 |
/* Sort by stamp */ |
/* Sort by stamp */ |
179 |
return False; |
return False; |
180 |
} |
} |
181 |
|
|
182 |
g_pstcache_Bpp = (g_server_bpp + 7) / 8; |
g_pstcache_Bpp = (g_server_depth + 7) / 8; |
183 |
sprintf(filename, "cache/pstcache_%d_%d", cache_id, g_pstcache_Bpp); |
sprintf(filename, "cache/pstcache_%d_%d", cache_id, g_pstcache_Bpp); |
184 |
DEBUG(("persistent bitmap cache file: %s\n", filename)); |
DEBUG(("persistent bitmap cache file: %s\n", filename)); |
185 |
|
|