Go to the source code of this file.
|
void | cache_rebuild_bmpcache_linked_list (RDPCLIENT *This, uint8 id, sint16 *idx, int count) |
|
void | cache_bump_bitmap (RDPCLIENT *This, uint8 id, uint16 idx, int bump) |
|
void | cache_evict_bitmap (RDPCLIENT *This, uint8 id) |
|
HBITMAP | cache_get_bitmap (RDPCLIENT *This, uint8 id, uint16 idx) |
|
void | cache_put_bitmap (RDPCLIENT *This, uint8 id, uint16 idx, HBITMAP bitmap) |
|
void | cache_save_state (RDPCLIENT *This) |
|
FONTGLYPH * | cache_get_font (RDPCLIENT *This, uint8 font, uint16 character) |
|
void | cache_put_font (RDPCLIENT *This, uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap) |
|
DATABLOB * | cache_get_text (RDPCLIENT *This, uint8 cache_id) |
|
void | cache_put_text (RDPCLIENT *This, uint8 cache_id, void *data, int length) |
|
uint8 * | cache_get_desktop (RDPCLIENT *This, uint32 offset, int cx, int cy, int bytes_per_pixel) |
|
void | cache_put_desktop (RDPCLIENT *This, uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 *data) |
|
HCURSOR | cache_get_cursor (RDPCLIENT *This, uint16 cache_idx) |
|
void | cache_put_cursor (RDPCLIENT *This, uint16 cache_idx, HCURSOR cursor) |
|
◆ BUMP_COUNT
◆ IS_PERSISTENT
#define IS_PERSISTENT |
( |
|
id | ) |
(This->pstcache_fd[id] > 0) |
◆ IS_SET
◆ NOT_SET
◆ NUM_ELEMENTS
◆ TO_TOP
◆ cache_bump_bitmap()
Definition at line 89 of file cache.c.
90{
92
94 return;
95
96 if (
This->cache.bmpcache_mru[
id] ==
idx)
97 return;
98
99 DEBUG_RDP5((
"bump bitmap: id=%d, idx=%d, bump=%d\n",
id,
idx, bump));
100
101 n_idx =
This->cache.bmpcache[
id][
idx].next;
102 p_idx =
This->cache.bmpcache[
id][
idx].previous;
103
105 {
106
107 --
This->cache.bmpcache_count[
id];
109 This->cache.bmpcache[
id][p_idx].next = n_idx;
110 else
111 This->cache.bmpcache_lru[
id] = n_idx;
113 This->cache.bmpcache[
id][n_idx].previous = p_idx;
114 else
115 This->cache.bmpcache_mru[
id] = p_idx;
116 }
117 else
118 {
120 n_idx =
This->cache.bmpcache_lru[
id];
121 }
122
123 if (bump >= 0)
124 {
125 for (
n = 0;
n < bump &&
IS_SET(n_idx);
n++)
126 {
127 p_idx = n_idx;
128 n_idx =
This->cache.bmpcache[
id][p_idx].next;
129 }
130 }
131 else
132 {
133 p_idx =
This->cache.bmpcache_mru[
id];
135 }
136
137
138 ++
This->cache.bmpcache_count[
id];
139 This->cache.bmpcache[
id][
idx].previous = p_idx;
140 This->cache.bmpcache[
id][
idx].next = n_idx;
141
142 if (p_idx >= 0)
143 This->cache.bmpcache[
id][p_idx].next =
idx;
144 else
146
147 if (n_idx >= 0)
148 This->cache.bmpcache[
id][n_idx].previous =
idx;
149 else
151}
#define IS_PERSISTENT(id)
◆ cache_evict_bitmap()
Definition at line 155 of file cache.c.
156{
158 int n_idx;
159
161 return;
162
164 n_idx =
This->cache.bmpcache[
id][
idx].next;
165 DEBUG_RDP5((
"evict bitmap: id=%d idx=%d n_idx=%d bmp=0x%x\n",
id,
idx, n_idx,
166 This->cache.bmpcache[
id][
idx].bitmap));
167
169 --
This->cache.bmpcache_count[
id];
170 This->cache.bmpcache[
id][
idx].bitmap = 0;
171
172 This->cache.bmpcache_lru[
id] = n_idx;
174
176}
void ui_destroy_bitmap(RD_HBITMAP bmp)
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp)
◆ cache_get_bitmap()
Definition at line 180 of file cache.c.
181{
183 {
185 {
188
189 return This->cache.bmpcache[
id][
idx].bitmap;
190 }
191 }
193 {
194 return This->cache.volatile_bc[
id];
195 }
196
197 error(
"get bitmap %d:%d\n",
id,
idx);
199}
void cache_bump_bitmap(uint8 id, uint16 idx, int bump)
#define NUM_ELEMENTS(array)
RD_BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
◆ cache_get_cursor()
Definition at line 381 of file cache.c.
382{
384
386 {
390 }
391
392 error(
"get cursor %d\n", cache_idx);
394}
◆ cache_get_desktop()
Definition at line 336 of file cache.c.
337{
339
342
344 {
346 }
347
350}
GLuint GLsizei GLsizei * length
_Out_opt_ int _Out_opt_ int * cy
◆ cache_get_font()
Definition at line 262 of file cache.c.
263{
265
267 {
268 glyph = &
This->cache.fontcache[
font][character];
270 return glyph;
271 }
272
273 error(
"get font %d:%d\n",
font, character);
275}
◆ cache_get_text()
Definition at line 306 of file cache.c.
307{
309
310 text = &
This->cache.textcache[cache_id];
312}
◆ cache_put_bitmap()
Definition at line 203 of file cache.c.
204{
206
208 {
209 old =
This->cache.bmpcache[
id][
idx].bitmap;
213
215 {
218
222 }
223 }
225 {
226 old =
This->cache.volatile_bc[
id];
230 }
231 else
232 {
233 error(
"put bitmap %d:%d\n",
id,
idx);
234 }
235}
void cache_evict_bitmap(uint8 id)
#define BMPCACHE2_C2_CELLS
◆ cache_put_cursor()
Definition at line 398 of file cache.c.
399{
401
403 {
404 old =
This->cache.cursorcache[cache_idx];
407
409 }
410 else
411 {
412 error(
"put cursor %d\n", cache_idx);
413 }
414}
void ui_destroy_cursor(RD_HCURSOR cursor)
◆ cache_put_desktop()
Definition at line 354 of file cache.c.
355{
357
360
362 {
363 cx *= bytes_per_pixel;
365 {
369 }
370 }
371 else
372 {
374 }
375}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define memcpy(s1, s2, n)
◆ cache_put_font()
Definition at line 279 of file cache.c.
281{
283
285 {
286 glyph = &
This->cache.fontcache[
font][character];
289
295 }
296 else
297 {
298 error(
"put font %d:%d\n",
font, character);
299 }
300}
void ui_destroy_glyph(RD_HGLYPH glyph)
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
◆ cache_put_text()
Definition at line 316 of file cache.c.
317{
320
322 return;
323
324 text = &
This->cache.textcache[cache_id];
330}
◆ cache_rebuild_bmpcache_linked_list()
Definition at line 43 of file cache.c.
44{
47
48
49 while (--
n >= 0 &&
This->cache.bmpcache[
id][
idx[
n]].bitmap ==
NULL);
51 {
53 return;
54 }
55
60
61
63 {
64
65 while (--
n >= 0 &&
This->cache.bmpcache[
id][
idx[
n]].bitmap ==
NULL);
66
68 break;
69
70 This->cache.bmpcache[
id][n_idx].previous =
idx[
n];
74 }
75
77 This->cache.bmpcache_lru[
id] = n_idx;
78
79 if (
c !=
This->cache.bmpcache_count[
id])
80 {
81 error(
"Oops. %d in bitmap cache linked list, %d in ui cache...\n",
c,
82 This->cache.bmpcache_count[
id]);
84 }
85}
GLuint GLuint GLsizei count
◆ cache_save_state()
Definition at line 239 of file cache.c.
240{
243
246 {
247 DEBUG_RDP5((
"Saving cache state for bitmap cache %d...",
id));
250 {
253 }
255 }
256}