27#define NUM_ELEMENTS(array) (sizeof(array) / sizeof(array[0]))
31#define IS_SET(idx) (idx >= 0)
96 error(
"Oops. %d in bitmap cache linked list, %d in ui cache...\n",
c,
114 DEBUG_RDP5((
"bump bitmap: id=%d, idx=%d, bump=%d\n",
id,
idx, bump));
140 for (
n = 0;
n < bump &&
IS_SET(n_idx);
n++)
180 DEBUG_RDP5((
"evict bitmap: id=%d idx=%d n_idx=%d bmp=%p\n",
id,
idx, n_idx,
212 error(
"get bitmap %d:%d\n",
id,
idx);
248 error(
"put bitmap %d:%d\n",
id,
idx);
262 DEBUG_RDP5((
"Saving cache state for bitmap cache %d...",
id));
290 error(
"get font %d:%d\n",
font, character);
315 error(
"put font %d:%d\n",
font, character);
380 cx *= bytes_per_pixel;
411 error(
"get cursor %d\n", cache_idx);
431 error(
"put cursor %d\n", cache_idx);
443 colour_code = colour_code == 1 ? 0 : 1;
448 error(
"get brush %d %d\n", colour_code,
idx);
459 colour_code = colour_code == 1 ? 0 : 1;
471 error(
"put brush %d %d\n", colour_code,
idx);
static struct bmpcache_entry g_bmpcache[3][0xa00]
void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width, uint16 height, RD_HGLYPH pixmap)
static uint8 g_deskcache[0x38400 *4]
BRUSHDATA * cache_get_brush_data(uint8 colour_code, uint8 idx)
RD_HCURSOR cache_get_cursor(uint16 cache_idx)
void cache_put_text(uint8 cache_id, void *data, int length)
static BRUSHDATA g_brushcache[2][64]
static RD_HCURSOR g_cursorcache[0x20]
RD_HBITMAP cache_get_bitmap(uint8 id, uint16 idx)
static FONTGLYPH g_fontcache[12][256]
FONTGLYPH * cache_get_font(uint8 font, uint16 character)
static int g_bmpcache_count[3]
void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 *data)
void cache_put_cursor(uint16 cache_idx, RD_HCURSOR cursor)
static int g_bmpcache_mru[3]
static int g_bmpcache_lru[3]
static RD_HBITMAP g_volatile_bc[3]
void cache_bump_bitmap(uint8 id, uint16 idx, int bump)
#define NUM_ELEMENTS(array)
static DATABLOB g_textcache[256]
void cache_put_bitmap(uint8 id, uint16 idx, RD_HBITMAP bitmap)
DATABLOB * cache_get_text(uint8 cache_id)
void cache_put_brush_data(uint8 colour_code, uint8 idx, BRUSHDATA *brush_data)
void cache_rebuild_bmpcache_linked_list(uint8 id, sint16 *idx, int count)
void cache_evict_bitmap(uint8 id)
void cache_save_state(void)
uint8 * cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel)
#define BMPCACHE2_C2_CELLS
#define IS_PERSISTENT(id)
void ui_destroy_bitmap(RD_HBITMAP bmp)
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp)
RD_BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
void ui_destroy_cursor(RD_HCURSOR cursor)
void ui_destroy_glyph(RD_HGLYPH glyph)
GLuint GLuint GLsizei count
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)
_Out_opt_ int _Out_opt_ int * cy