22#define MAX_CELL_SIZE 0x1000
24#define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0)
73 DEBUG((
"Load bitmap from disk: id=%d, idx=%d, bmp=%p)\n", cache_id, cache_idx,
bitmap));
122 DEBUG_RDP5((
"Persistent bitmap cache enumeration... "));
139 for (
n =
idx;
n > 0 && cellhdr.
stamp < mru_stamp[
n - 1];
n--)
141 mru_idx[
n] = mru_idx[
n - 1];
142 mru_stamp[
n] = mru_stamp[
n - 1];
146 mru_stamp[
n] = cellhdr.
stamp;
178 DEBUG((
"failed to get/make cache directory!\n"));
192 warning(
"Persistent bitmap caching is disabled. (The file is already in use)\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
void cache_put_bitmap(uint8 id, uint16 idx, RD_HBITMAP bitmap)
void cache_rebuild_bmpcache_linked_list(uint8 id, sint16 *idx, int count)
#define BMPCACHE2_NUM_PSTCELLS
RD_HBITMAP ui_create_bitmap(int width, int height, uint8 *data)
int rd_write_file(int fd, void *ptr, int len)
int rd_read_file(int fd, void *ptr, int len)
void rd_close_file(int fd)
RD_BOOL rd_lock_file(int fd, int start, int len)
RD_BOOL rd_pstcache_mkdir(void)
int rd_lseek_file(int fd, int offset)
int rd_open_file(char *filename)
RD_BOOL pstcache_init(uint8 cache_id)
RD_BOOL g_bitmap_cache_precache
RD_BOOL pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 *key, uint8 width, uint8 height, uint16 length, uint8 *data)
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp)
RD_BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
RD_BOOL g_pstcache_enumerated
RD_BOOL g_bitmap_cache_persist_enable
#define IS_PERSISTENT(id)
int pstcache_enumerate(uint8 id, HASH_KEY *keylist)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLuint GLsizei GLsizei * length
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)