ReactOS  0.4.11-dev-946-g431643b
cache.c File Reference
#include "precomp.h"
Include dependency graph for cache.c:

Go to the source code of this file.

Classes

struct  bmpcache_entry
 

Macros

#define NUM_ELEMENTS(array)   (sizeof(array) / sizeof(array[0]))
 
#define TO_TOP   -1
 
#define NOT_SET   -1
 
#define IS_SET(idx)   (idx >= 0)
 
#define BUMP_COUNT   40
 

Functions

void cache_rebuild_bmpcache_linked_list (uint8 id, sint16 *idx, int count)
 
void cache_bump_bitmap (uint8 id, uint16 idx, int bump)
 
void cache_evict_bitmap (uint8 id)
 
RD_HBITMAP cache_get_bitmap (uint8 id, uint16 idx)
 
void cache_put_bitmap (uint8 id, uint16 idx, RD_HBITMAP bitmap)
 
void cache_save_state (void)
 
FONTGLYPHcache_get_font (uint8 font, uint16 character)
 
void cache_put_font (uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width, uint16 height, RD_HGLYPH pixmap)
 
DATABLOBcache_get_text (uint8 cache_id)
 
void cache_put_text (uint8 cache_id, void *data, int length)
 
uint8cache_get_desktop (uint32 offset, int cx, int cy, int bytes_per_pixel)
 
void cache_put_desktop (uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 *data)
 
RD_HCURSOR cache_get_cursor (uint16 cache_idx)
 
void cache_put_cursor (uint16 cache_idx, RD_HCURSOR cursor)
 
BRUSHDATAcache_get_brush_data (uint8 colour_code, uint8 idx)
 
void cache_put_brush_data (uint8 colour_code, uint8 idx, BRUSHDATA *brush_data)
 

Variables

int g_pstcache_fd []
 
static struct bmpcache_entry g_bmpcache [3][0xa00]
 
static RD_HBITMAP g_volatile_bc [3]
 
static int g_bmpcache_lru [3] = { NOT_SET, NOT_SET, NOT_SET }
 
static int g_bmpcache_mru [3] = { NOT_SET, NOT_SET, NOT_SET }
 
static int g_bmpcache_count [3]
 
static FONTGLYPH g_fontcache [12][256]
 
static DATABLOB g_textcache [256]
 
static uint8 g_deskcache [0x38400 *4]
 
static RD_HCURSOR g_cursorcache [0x20]
 
static BRUSHDATA g_brushcache [2][64]
 

Macro Definition Documentation

◆ BUMP_COUNT

#define BUMP_COUNT   40

Definition at line 39 of file cache.c.

Referenced by cache_get_bitmap().

◆ IS_SET

#define IS_SET (   idx)    (idx >= 0)

Definition at line 31 of file cache.c.

Referenced by cache_bump_bitmap().

◆ NOT_SET

#define NOT_SET   -1

◆ NUM_ELEMENTS

◆ TO_TOP

#define TO_TOP   -1

Definition at line 29 of file cache.c.

Referenced by cache_put_bitmap().

Function Documentation

◆ cache_bump_bitmap()

void cache_bump_bitmap ( uint8  id,
uint16  idx,
int  bump 
)

Definition at line 104 of file cache.c.

Referenced by cache_get_bitmap(), and cache_put_bitmap().

105 {
106  int p_idx, n_idx, n;
107 
108  if (!IS_PERSISTENT(id))
109  return;
110 
111  if (g_bmpcache_mru[id] == idx)
112  return;
113 
114  DEBUG_RDP5(("bump bitmap: id=%d, idx=%d, bump=%d\n", id, idx, bump));
115 
116  n_idx = g_bmpcache[id][idx].next;
117  p_idx = g_bmpcache[id][idx].previous;
118 
119  if (IS_SET(n_idx))
120  {
121  /* remove */
122  --g_bmpcache_count[id];
123  if (IS_SET(p_idx))
124  g_bmpcache[id][p_idx].next = n_idx;
125  else
126  g_bmpcache_lru[id] = n_idx;
127  if (IS_SET(n_idx))
128  g_bmpcache[id][n_idx].previous = p_idx;
129  else
130  g_bmpcache_mru[id] = p_idx;
131  }
132  else
133  {
134  p_idx = NOT_SET;
135  n_idx = g_bmpcache_lru[id];
136  }
137 
138  if (bump >= 0)
139  {
140  for (n = 0; n < bump && IS_SET(n_idx); n++)
141  {
142  p_idx = n_idx;
143  n_idx = g_bmpcache[id][p_idx].next;
144  }
145  }
146  else
147  {
148  p_idx = g_bmpcache_mru[id];
149  n_idx = NOT_SET;
150  }
151 
152  /* insert */
153  ++g_bmpcache_count[id];
154  g_bmpcache[id][idx].previous = p_idx;
155  g_bmpcache[id][idx].next = n_idx;
156 
157  if (p_idx >= 0)
158  g_bmpcache[id][p_idx].next = idx;
159  else
160  g_bmpcache_lru[id] = idx;
161 
162  if (n_idx >= 0)
163  g_bmpcache[id][n_idx].previous = idx;
164  else
165  g_bmpcache_mru[id] = idx;
166 }
#define IS_SET(idx)
Definition: cache.c:31
static int g_bmpcache_lru[3]
Definition: cache.c:51
static int g_bmpcache_count[3]
Definition: cache.c:54
static int g_bmpcache_mru[3]
Definition: cache.c:52
GLuint n
Definition: s_context.h:57
unsigned int idx
Definition: utils.c:41
#define IS_PERSISTENT(id)
Definition: cache.c:28
#define NOT_SET
Definition: cache.c:30
#define DEBUG_RDP5(args)
Definition: rdesktop.h:141
static struct bmpcache_entry g_bmpcache[3][0xa00]
Definition: cache.c:48
GLenum GLuint id
Definition: glext.h:5579

◆ cache_evict_bitmap()

void cache_evict_bitmap ( uint8  id)

Definition at line 170 of file cache.c.

Referenced by cache_put_bitmap().

171 {
172  uint16 idx;
173  int n_idx;
174 
175  if (!IS_PERSISTENT(id))
176  return;
177 
178  idx = g_bmpcache_lru[id];
179  n_idx = g_bmpcache[id][idx].next;
180  DEBUG_RDP5(("evict bitmap: id=%d idx=%d n_idx=%d bmp=%p\n", id, idx, n_idx,
181  g_bmpcache[id][idx].bitmap));
182 
184  --g_bmpcache_count[id];
185  g_bmpcache[id][idx].bitmap = 0;
186 
187  g_bmpcache_lru[id] = n_idx;
188  g_bmpcache[id][n_idx].previous = NOT_SET;
189 
190  pstcache_touch_bitmap(id, idx, 0);
191 }
static int g_bmpcache_lru[3]
Definition: cache.c:51
static int g_bmpcache_count[3]
Definition: cache.c:54
unsigned int idx
Definition: utils.c:41
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp)
Definition: pstcache.c:39
Definition: uimain.c:88
#define IS_PERSISTENT(id)
Definition: cache.c:28
#define NOT_SET
Definition: cache.c:30
#define DEBUG_RDP5(args)
Definition: rdesktop.h:141
void ui_destroy_bitmap(RD_HBITMAP bmp)
unsigned short uint16
Definition: types.h:30
static struct bmpcache_entry g_bmpcache[3][0xa00]
Definition: cache.c:48
GLenum GLuint id
Definition: glext.h:5579

◆ cache_get_bitmap()

RD_HBITMAP cache_get_bitmap ( uint8  id,
uint16  idx 
)

Definition at line 195 of file cache.c.

Referenced by process_memblt(), and process_triblt().

196 {
197  if ((id < NUM_ELEMENTS(g_bmpcache)) && (idx < NUM_ELEMENTS(g_bmpcache[0])))
198  {
199  if (g_bmpcache[id][idx].bitmap || pstcache_load_bitmap(id, idx))
200  {
201  if (IS_PERSISTENT(id))
203 
204  return g_bmpcache[id][idx].bitmap;
205  }
206  }
207  else if ((id < NUM_ELEMENTS(g_volatile_bc)) && (idx == 0x7fff))
208  {
209  return g_volatile_bc[id];
210  }
211 
212  error("get bitmap %d:%d\n", id, idx);
213  return NULL;
214 }
RD_BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
Definition: pstcache.c:53
void cache_bump_bitmap(uint8 id, uint16 idx, int bump)
Definition: cache.c:104
#define error(str)
Definition: mkdosfs.c:1605
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
static RD_HBITMAP g_volatile_bc[3]
Definition: cache.c:49
Definition: uimain.c:88
#define IS_PERSISTENT(id)
Definition: cache.c:28
#define NUM_ELEMENTS(array)
Definition: cache.c:27
static struct bmpcache_entry g_bmpcache[3][0xa00]
Definition: cache.c:48
GLenum GLuint id
Definition: glext.h:5579
#define BUMP_COUNT
Definition: cache.c:39

◆ cache_get_brush_data()

BRUSHDATA* cache_get_brush_data ( uint8  colour_code,
uint8  idx 
)

Definition at line 441 of file cache.c.

Referenced by setup_brush().

442 {
443  colour_code = colour_code == 1 ? 0 : 1;
444  if (idx < NUM_ELEMENTS(g_brushcache[0]))
445  {
446  return &g_brushcache[colour_code][idx];
447  }
448  error("get brush %d %d\n", colour_code, idx);
449  return NULL;
450 }
#define error(str)
Definition: mkdosfs.c:1605
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
#define NUM_ELEMENTS(array)
Definition: cache.c:27
static BRUSHDATA g_brushcache[2][64]
Definition: cache.c:437

◆ cache_get_cursor()

RD_HCURSOR cache_get_cursor ( uint16  cache_idx)

Definition at line 400 of file cache.c.

Referenced by process_cached_pointer_pdu().

401 {
403 
404  if (cache_idx < NUM_ELEMENTS(g_cursorcache))
405  {
406  cursor = g_cursorcache[cache_idx];
407  if (cursor != NULL)
408  return cursor;
409  }
410 
411  error("get cursor %d\n", cache_idx);
412  return NULL;
413 }
#define error(str)
Definition: mkdosfs.c:1605
smooth NULL
Definition: ftsmooth.c:416
#define NUM_ELEMENTS(array)
Definition: cache.c:27
const char cursor[]
Definition: icontest.c:13
static RD_HCURSOR g_cursorcache[0x20]
Definition: cache.c:396

◆ cache_get_desktop()

uint8* cache_get_desktop ( uint32  offset,
int  cx,
int  cy,
int  bytes_per_pixel 
)

Definition at line 353 of file cache.c.

Referenced by RdpClientUI::Display_RestoreDesktop(), and ui_desktop_restore().

354 {
355  int length = cx * cy * bytes_per_pixel;
356 
357  if (offset > sizeof(g_deskcache))
358  offset = 0;
359 
360  if ((offset + length) <= sizeof(g_deskcache))
361  {
362  return &g_deskcache[offset];
363  }
364 
365  error("get desktop %d:%d\n", offset, length);
366  return NULL;
367 }
#define error(str)
Definition: mkdosfs.c:1605
GLintptr offset
Definition: glext.h:5920
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
smooth NULL
Definition: ftsmooth.c:416
static uint8 g_deskcache[0x38400 *4]
Definition: cache.c:349
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ cache_get_font()

FONTGLYPH* cache_get_font ( uint8  font,
uint16  character 
)

Definition at line 279 of file cache.c.

280 {
281  FONTGLYPH *glyph;
282 
283  if ((font < NUM_ELEMENTS(g_fontcache)) && (character < NUM_ELEMENTS(g_fontcache[0])))
284  {
285  glyph = &g_fontcache[font][character];
286  if (glyph->pixmap != NULL)
287  return glyph;
288  }
289 
290  error("get font %d:%d\n", font, character);
291  return NULL;
292 }
#define error(str)
Definition: mkdosfs.c:1605
Definition: mk_font.cpp:20
smooth NULL
Definition: ftsmooth.c:416
#define NUM_ELEMENTS(array)
Definition: cache.c:27
static FONTGLYPH g_fontcache[12][256]
Definition: cache.c:275
RD_HBITMAP pixmap
Definition: types.h:116

◆ cache_get_text()

DATABLOB* cache_get_text ( uint8  cache_id)

Definition at line 325 of file cache.c.

Referenced by ui_draw_text().

326 {
327  DATABLOB *text;
328 
329  text = &g_textcache[cache_id];
330  return text;
331 }
const WCHAR * text
Definition: package.c:1827
static DATABLOB g_textcache[256]
Definition: cache.c:321

◆ cache_put_bitmap()

void cache_put_bitmap ( uint8  id,
uint16  idx,
RD_HBITMAP  bitmap 
)

Definition at line 218 of file cache.c.

Referenced by process_bmpcache(), process_bmpcache2(), process_raw_bmpcache(), and pstcache_load_bitmap().

219 {
220  RD_HBITMAP old;
221 
222  if ((id < NUM_ELEMENTS(g_bmpcache)) && (idx < NUM_ELEMENTS(g_bmpcache[0])))
223  {
224  old = g_bmpcache[id][idx].bitmap;
225  if (old != NULL)
226  ui_destroy_bitmap(old);
227  g_bmpcache[id][idx].bitmap = bitmap;
228 
229  if (IS_PERSISTENT(id))
230  {
231  if (old == NULL)
232  g_bmpcache[id][idx].previous = g_bmpcache[id][idx].next = NOT_SET;
233 
236  cache_evict_bitmap(id);
237  }
238  }
239  else if ((id < NUM_ELEMENTS(g_volatile_bc)) && (idx == 0x7fff))
240  {
241  old = g_volatile_bc[id];
242  if (old != NULL)
243  ui_destroy_bitmap(old);
245  }
246  else
247  {
248  error("put bitmap %d:%d\n", id, idx);
249  }
250 }
#define TO_TOP
Definition: cache.c:29
#define BMPCACHE2_C2_CELLS
Definition: constants.h:284
void cache_bump_bitmap(uint8 id, uint16 idx, int bump)
Definition: cache.c:104
#define error(str)
Definition: mkdosfs.c:1605
static int g_bmpcache_count[3]
Definition: cache.c:54
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
static RD_HBITMAP g_volatile_bc[3]
Definition: cache.c:49
#define IS_PERSISTENT(id)
Definition: cache.c:28
#define NUM_ELEMENTS(array)
Definition: cache.c:27
void cache_evict_bitmap(uint8 id)
Definition: cache.c:170
#define NOT_SET
Definition: cache.c:30
void ui_destroy_bitmap(RD_HBITMAP bmp)
static struct bmpcache_entry g_bmpcache[3][0xa00]
Definition: cache.c:48
GLenum GLuint id
Definition: glext.h:5579
static HBITMAP bitmap
Definition: clipboard.c:1344

◆ cache_put_brush_data()

void cache_put_brush_data ( uint8  colour_code,
uint8  idx,
BRUSHDATA brush_data 
)

Definition at line 455 of file cache.c.

Referenced by process_brushcache().

456 {
457  BRUSHDATA *bd;
458 
459  colour_code = colour_code == 1 ? 0 : 1;
460  if (idx < NUM_ELEMENTS(g_brushcache[0]))
461  {
462  bd = &g_brushcache[colour_code][idx];
463  if (bd->data != 0)
464  {
465  xfree(bd->data);
466  }
467  memcpy(bd, brush_data, sizeof(BRUSHDATA));
468  }
469  else
470  {
471  error("put brush %d %d\n", colour_code, idx);
472  }
473 }
#define error(str)
Definition: mkdosfs.c:1605
unsigned int idx
Definition: utils.c:41
void xfree(void *mem)
Definition: uimain.c:758
#define NUM_ELEMENTS(array)
Definition: cache.c:27
uint8 * data
Definition: types.h:96
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static BRUSHDATA g_brushcache[2][64]
Definition: cache.c:437

◆ cache_put_cursor()

void cache_put_cursor ( uint16  cache_idx,
RD_HCURSOR  cursor 
)

Definition at line 417 of file cache.c.

Referenced by process_colour_pointer_common(), and process_colour_pointer_pdu().

418 {
419  RD_HCURSOR old;
420 
421  if (cache_idx < NUM_ELEMENTS(g_cursorcache))
422  {
423  old = g_cursorcache[cache_idx];
424  if (old != NULL)
425  ui_destroy_cursor(old);
426 
427  g_cursorcache[cache_idx] = cursor;
428  }
429  else
430  {
431  error("put cursor %d\n", cache_idx);
432  }
433 }
#define error(str)
Definition: mkdosfs.c:1605
smooth NULL
Definition: ftsmooth.c:416
#define NUM_ELEMENTS(array)
Definition: cache.c:27
void ui_destroy_cursor(HCURSOR)
Definition: qtewin.cpp:1502
const char cursor[]
Definition: icontest.c:13
static RD_HCURSOR g_cursorcache[0x20]
Definition: cache.c:396

◆ cache_put_desktop()

void cache_put_desktop ( uint32  offset,
int  cx,
int  cy,
int  scanline,
int  bytes_per_pixel,
uint8 data 
)

Definition at line 371 of file cache.c.

Referenced by RdpClientUI::Display_SaveDesktop(), and ui_desktop_save().

372 {
373  int length = cx * cy * bytes_per_pixel;
374 
375  if (offset > sizeof(g_deskcache))
376  offset = 0;
377 
378  if ((offset + length) <= sizeof(g_deskcache))
379  {
380  cx *= bytes_per_pixel;
381  while (cy--)
382  {
384  data += scanline;
385  offset += cx;
386  }
387  }
388  else
389  {
390  error("put desktop %d:%d\n", offset, length);
391  }
392 }
#define error(str)
Definition: mkdosfs.c:1605
GLintptr offset
Definition: glext.h:5920
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
static uint8 g_deskcache[0x38400 *4]
Definition: cache.c:349
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_Out_opt_ int * cx
Definition: commctrl.h:570

◆ cache_put_font()

void cache_put_font ( uint8  font,
uint16  character,
uint16  offset,
uint16  baseline,
uint16  width,
uint16  height,
RD_HGLYPH  pixmap 
)

Definition at line 296 of file cache.c.

Referenced by process_fontcache().

298 {
299  FONTGLYPH *glyph;
300 
301  if ((font < NUM_ELEMENTS(g_fontcache)) && (character < NUM_ELEMENTS(g_fontcache[0])))
302  {
303  glyph = &g_fontcache[font][character];
304  if (glyph->pixmap != NULL)
305  ui_destroy_glyph(glyph->pixmap);
306 
307  glyph->offset = offset;
308  glyph->baseline = baseline;
309  glyph->width = width;
310  glyph->height = height;
311  glyph->pixmap = pixmap;
312  }
313  else
314  {
315  error("put font %d:%d\n", font, character);
316  }
317 }
GLint GLint GLsizei width
Definition: gl.h:1546
#define error(str)
Definition: mkdosfs.c:1605
Definition: mk_font.cpp:20
uint16 height
Definition: types.h:115
GLintptr offset
Definition: glext.h:5920
sint16 baseline
Definition: types.h:113
smooth NULL
Definition: ftsmooth.c:416
#define NUM_ELEMENTS(array)
Definition: cache.c:27
static FONTGLYPH g_fontcache[12][256]
Definition: cache.c:275
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
uint16 width
Definition: types.h:114
sint16 offset
Definition: types.h:112
RD_HBITMAP pixmap
Definition: types.h:116
void ui_destroy_glyph(RD_HGLYPH glyph)
Definition: qtewin.cpp:1424

◆ cache_put_text()

void cache_put_text ( uint8  cache_id,
void data,
int  length 
)

Definition at line 335 of file cache.c.

Referenced by ui_draw_text().

336 {
337  DATABLOB *text;
338 
339  text = &g_textcache[cache_id];
340  if (text->data != NULL)
341  xfree(text->data);
342  text->data = xmalloc(length);
343  text->size = length;
344  memcpy(text->data, data, length);
345 }
int size
Definition: types.h:124
const WCHAR * text
Definition: package.c:1827
void * xmalloc(int size)
Definition: uimain.c:747
smooth NULL
Definition: ftsmooth.c:416
void xfree(void *mem)
Definition: uimain.c:758
static DATABLOB g_textcache[256]
Definition: cache.c:321
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
void * data
Definition: types.h:123

◆ cache_rebuild_bmpcache_linked_list()

void cache_rebuild_bmpcache_linked_list ( uint8  id,
sint16 idx,
int  count 
)

Definition at line 58 of file cache.c.

Referenced by pstcache_enumerate().

59 {
60  int n = count, c = 0;
61  sint16 n_idx;
62 
63  /* find top, skip evicted bitmaps */
64  while (--n >= 0 && g_bmpcache[id][idx[n]].bitmap == NULL);
65  if (n < 0)
66  {
68  return;
69  }
70 
71  g_bmpcache_mru[id] = idx[n];
72  g_bmpcache[id][idx[n]].next = NOT_SET;
73  n_idx = idx[n];
74  c++;
75 
76  /* link list */
77  while (n >= 0)
78  {
79  /* skip evicted bitmaps */
80  while (--n >= 0 && g_bmpcache[id][idx[n]].bitmap == NULL);
81 
82  if (n < 0)
83  break;
84 
85  g_bmpcache[id][n_idx].previous = idx[n];
86  g_bmpcache[id][idx[n]].next = n_idx;
87  n_idx = idx[n];
88  c++;
89  }
90 
91  g_bmpcache[id][n_idx].previous = NOT_SET;
92  g_bmpcache_lru[id] = n_idx;
93 
94  if (c != g_bmpcache_count[id])
95  {
96  error("Oops. %d in bitmap cache linked list, %d in ui cache...\n", c,
97  g_bmpcache_count[id]);
99  }
100 }
#define error(str)
Definition: mkdosfs.c:1605
static int g_bmpcache_lru[3]
Definition: cache.c:51
GLuint GLuint GLsizei count
Definition: gl.h:1545
static int g_bmpcache_count[3]
Definition: cache.c:54
static int g_bmpcache_mru[3]
Definition: cache.c:52
GLuint n
Definition: s_context.h:57
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
const GLubyte * c
Definition: glext.h:8905
#define EX_SOFTWARE
Definition: rdesktop.h:70
signed short sint16
Definition: types.h:31
#define NOT_SET
Definition: cache.c:30
static struct bmpcache_entry g_bmpcache[3][0xa00]
Definition: cache.c:48
GLenum GLuint id
Definition: glext.h:5579
void exit(int exitcode)
Definition: _exit.c:33

◆ cache_save_state()

void cache_save_state ( void  )

Definition at line 254 of file cache.c.

Referenced by main().

255 {
256  uint32 id = 0, t = 0;
257  int idx;
258 
259  for (id = 0; id < NUM_ELEMENTS(g_bmpcache); id++)
260  if (IS_PERSISTENT(id))
261  {
262  DEBUG_RDP5(("Saving cache state for bitmap cache %d...", id));
263  idx = g_bmpcache_lru[id];
264  while (idx >= 0)
265  {
266  pstcache_touch_bitmap(id, idx, ++t);
267  idx = g_bmpcache[id][idx].next;
268  }
269  DEBUG_RDP5((" %d stamps written.\n", t));
270  }
271 }
static int g_bmpcache_lru[3]
Definition: cache.c:51
unsigned int uint32
Definition: types.h:32
GLdouble GLdouble t
Definition: gl.h:2047
unsigned int idx
Definition: utils.c:41
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp)
Definition: pstcache.c:39
#define IS_PERSISTENT(id)
Definition: cache.c:28
#define NUM_ELEMENTS(array)
Definition: cache.c:27
#define DEBUG_RDP5(args)
Definition: rdesktop.h:141
static struct bmpcache_entry g_bmpcache[3][0xa00]
Definition: cache.c:48
GLenum GLuint id
Definition: glext.h:5579

Variable Documentation

◆ g_bmpcache

◆ g_bmpcache_count

int g_bmpcache_count[3]
static

◆ g_bmpcache_lru

int g_bmpcache_lru[3] = { NOT_SET, NOT_SET, NOT_SET }
static

◆ g_bmpcache_mru

int g_bmpcache_mru[3] = { NOT_SET, NOT_SET, NOT_SET }
static

Definition at line 52 of file cache.c.

Referenced by cache_bump_bitmap(), and cache_rebuild_bmpcache_linked_list().

◆ g_brushcache

BRUSHDATA g_brushcache[2][64]
static

Definition at line 437 of file cache.c.

◆ g_cursorcache

RD_HCURSOR g_cursorcache[0x20]
static

Definition at line 396 of file cache.c.

◆ g_deskcache

uint8 g_deskcache[0x38400 *4]
static

Definition at line 349 of file cache.c.

Referenced by cache_get_desktop(), and cache_put_desktop().

◆ g_fontcache

FONTGLYPH g_fontcache[12][256]
static

Definition at line 275 of file cache.c.

◆ g_pstcache_fd

◆ g_textcache

DATABLOB g_textcache[256]
static

Definition at line 321 of file cache.c.

◆ g_volatile_bc

RD_HBITMAP g_volatile_bc[3]
static

Definition at line 49 of file cache.c.