/[rdesktop]/sourceforge.net/trunk/rdesktop/cache.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1294 by astrand, Wed Oct 11 17:59:18 2006 UTC revision 1364 by jsorg71, Thu Jan 4 04:55:56 2007 UTC
# Line 40  extern int g_pstcache_fd[]; Line 40  extern int g_pstcache_fd[];
40    
41  struct bmpcache_entry  struct bmpcache_entry
42  {  {
43          HBITMAP bitmap;          RD_HBITMAP bitmap;
44          sint16 previous;          sint16 previous;
45          sint16 next;          sint16 next;
46  };  };
47    
48  static struct bmpcache_entry g_bmpcache[3][0xa00];  static struct bmpcache_entry g_bmpcache[3][0xa00];
49  static HBITMAP g_volatile_bc[3];  static RD_HBITMAP g_volatile_bc[3];
50    
51  static int g_bmpcache_lru[3] = { NOT_SET, NOT_SET, NOT_SET };  static int g_bmpcache_lru[3] = { NOT_SET, NOT_SET, NOT_SET };
52  static int g_bmpcache_mru[3] = { NOT_SET, NOT_SET, NOT_SET };  static int g_bmpcache_mru[3] = { NOT_SET, NOT_SET, NOT_SET };
# Line 190  cache_evict_bitmap(uint8 id) Line 190  cache_evict_bitmap(uint8 id)
190  }  }
191    
192  /* Retrieve a bitmap from the cache */  /* Retrieve a bitmap from the cache */
193  HBITMAP  RD_HBITMAP
194  cache_get_bitmap(uint8 id, uint16 idx)  cache_get_bitmap(uint8 id, uint16 idx)
195  {  {
196          if ((id < NUM_ELEMENTS(g_bmpcache)) && (idx < NUM_ELEMENTS(g_bmpcache[0])))          if ((id < NUM_ELEMENTS(g_bmpcache)) && (idx < NUM_ELEMENTS(g_bmpcache[0])))
# Line 214  cache_get_bitmap(uint8 id, uint16 idx) Line 214  cache_get_bitmap(uint8 id, uint16 idx)
214    
215  /* Store a bitmap in the cache */  /* Store a bitmap in the cache */
216  void  void
217  cache_put_bitmap(uint8 id, uint16 idx, HBITMAP bitmap)  cache_put_bitmap(uint8 id, uint16 idx, RD_HBITMAP bitmap)
218  {  {
219          HBITMAP old;          RD_HBITMAP old;
220    
221          if ((id < NUM_ELEMENTS(g_bmpcache)) && (idx < NUM_ELEMENTS(g_bmpcache[0])))          if ((id < NUM_ELEMENTS(g_bmpcache)) && (idx < NUM_ELEMENTS(g_bmpcache[0])))
222          {          {
# Line 293  cache_get_font(uint8 font, uint16 charac Line 293  cache_get_font(uint8 font, uint16 charac
293  /* Store a glyph in the font cache */  /* Store a glyph in the font cache */
294  void  void
295  cache_put_font(uint8 font, uint16 character, uint16 offset,  cache_put_font(uint8 font, uint16 character, uint16 offset,
296                 uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap)                 uint16 baseline, uint16 width, uint16 height, RD_HGLYPH pixmap)
297  {  {
298          FONTGLYPH *glyph;          FONTGLYPH *glyph;
299    
# Line 392  cache_put_desktop(uint32 offset, int cx, Line 392  cache_put_desktop(uint32 offset, int cx,
392    
393    
394  /* CURSOR CACHE */  /* CURSOR CACHE */
395  static HCURSOR g_cursorcache[0x20];  static RD_HCURSOR g_cursorcache[0x20];
396    
397  /* Retrieve cursor from cache */  /* Retrieve cursor from cache */
398  HCURSOR  RD_HCURSOR
399  cache_get_cursor(uint16 cache_idx)  cache_get_cursor(uint16 cache_idx)
400  {  {
401          HCURSOR cursor;          RD_HCURSOR cursor;
402    
403          if (cache_idx < NUM_ELEMENTS(g_cursorcache))          if (cache_idx < NUM_ELEMENTS(g_cursorcache))
404          {          {
# Line 413  cache_get_cursor(uint16 cache_idx) Line 413  cache_get_cursor(uint16 cache_idx)
413    
414  /* Store cursor in cache */  /* Store cursor in cache */
415  void  void
416  cache_put_cursor(uint16 cache_idx, HCURSOR cursor)  cache_put_cursor(uint16 cache_idx, RD_HCURSOR cursor)
417  {  {
418          HCURSOR old;          RD_HCURSOR old;
419    
420          if (cache_idx < NUM_ELEMENTS(g_cursorcache))          if (cache_idx < NUM_ELEMENTS(g_cursorcache))
421          {          {

Legend:
Removed from v.1294  
changed lines
  Added in v.1364

  ViewVC Help
Powered by ViewVC 1.1.26