bitmap cache change

ulab-original
jsorg71 20 years ago
parent 16b9bacf75
commit dda1ae712c

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/sh
startkde startkde
#blackbox #blackbox
#fvwm95

@ -94,7 +94,7 @@ int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
bmp_size = (bitmap->width + e) * bitmap->height * Bpp; bmp_size = (bitmap->width + e) * bitmap->height * Bpp;
self->bitmap_stamp++; self->bitmap_stamp++;
/* look for match */ /* look for match */
if (bmp_size < self->cache1_size) if (bmp_size <= self->cache1_size)
{ {
i = 0; i = 0;
for (j = 0; j < self->cache1_entries; j++) for (j = 0; j < self->cache1_entries; j++)
@ -113,7 +113,7 @@ int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
} }
} }
} }
else if (bmp_size < self->cache2_size) else if (bmp_size <= self->cache2_size)
{ {
i = 1; i = 1;
for (j = 0; j < self->cache2_entries; j++) for (j = 0; j < self->cache2_entries; j++)
@ -132,7 +132,7 @@ int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
} }
} }
} }
else if (bmp_size < self->cache3_size) else if (bmp_size <= self->cache3_size)
{ {
i = 2; i = 2;
for (j = 0; j < self->cache3_entries; j++) for (j = 0; j < self->cache3_entries; j++)
@ -153,13 +153,13 @@ int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
} }
else else
{ {
g_printf("error in xrdp_cache_add_bitmap, too big\n\r"); g_printf("error in xrdp_cache_add_bitmap, too big(%d)\n\r", bmp_size);
} }
/* look for oldest */ /* look for oldest */
cache_id = 0; cache_id = 0;
cache_idx = 0; cache_idx = 0;
oldest = 0x7fffffff; oldest = 0x7fffffff;
if (bmp_size < self->cache1_size) if (bmp_size <= self->cache1_size)
{ {
i = 0; i = 0;
for (j = 0; j < self->cache1_entries; j++) for (j = 0; j < self->cache1_entries; j++)
@ -172,7 +172,7 @@ int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
} }
} }
} }
else if (bmp_size < self->cache2_size) else if (bmp_size <= self->cache2_size)
{ {
i = 1; i = 1;
for (j = 0; j < self->cache2_entries; j++) for (j = 0; j < self->cache2_entries; j++)
@ -185,7 +185,7 @@ int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
} }
} }
} }
else if (bmp_size < self->cache3_size) else if (bmp_size <= self->cache3_size)
{ {
i = 2; i = 2;
for (j = 0; j < self->cache3_entries; j++) for (j = 0; j < self->cache3_entries; j++)

@ -262,7 +262,7 @@ int xrdp_painter_fill_rect2(struct xrdp_painter* self,
} }
#define SSW 64 #define SSW 64
#define SSH 63 #define SSH 60
/*****************************************************************************/ /*****************************************************************************/
int xrdp_painter_draw_bitmap(struct xrdp_painter* self, int xrdp_painter_draw_bitmap(struct xrdp_painter* self,

Loading…
Cancel
Save