#include <ft2build.h>
#include "ftcmanag.h"
#include "ftccback.h"
#include "ftcerror.h"
Go to the source code of this file.
|
static void | ftc_node_mru_link (FTC_Node node, FTC_Manager manager) |
|
static void | ftc_node_mru_unlink (FTC_Node node, FTC_Manager manager) |
|
static void | ftc_cache_resize (FTC_Cache cache) |
|
static void | ftc_node_hash_unlink (FTC_Node node0, FTC_Cache cache) |
|
static void | ftc_node_hash_link (FTC_Node node, FTC_Cache cache) |
|
| ftc_node_destroy (FTC_Node node, FTC_Manager manager) |
|
| FTC_Cache_Init (FTC_Cache cache) |
|
| ftc_cache_init (FTC_Cache cache) |
|
static void | FTC_Cache_Clear (FTC_Cache cache) |
|
| ftc_cache_done (FTC_Cache cache) |
|
| FTC_Cache_Done (FTC_Cache cache) |
|
static void | ftc_cache_add (FTC_Cache cache, FT_Offset hash, FTC_Node node) |
|
| FTC_Cache_NewNode (FTC_Cache cache, FT_Offset hash, FT_Pointer query, FTC_Node *anode) |
|
| FTC_Cache_RemoveFaceID (FTC_Cache cache, FTC_FaceID face_id) |
|
◆ FT_COMPONENT
◆ FTC_HASH_INITIAL_SIZE
#define FTC_HASH_INITIAL_SIZE 8 |
◆ FTC_HASH_MAX_LOAD
◆ FTC_HASH_MIN_LOAD
◆ FTC_HASH_SUB_LOAD
◆ ftc_cache_add()
Definition at line 416 of file ftccache.c.
419 {
423
426
427 {
429
430
432
434 {
438 }
439 }
440 }
static void ftc_node_mru_link(FTC_Node node, FTC_Manager manager)
static void ftc_node_hash_link(FTC_Node node, FTC_Cache cache)
FTC_Manager_Compress(FTC_Manager manager)
Referenced by FTC_Cache_NewNode().
◆ FTC_Cache_Clear()
Definition at line 351 of file ftccache.c.
352 {
354 {
358
359
361
363 {
365
366
368 {
371
372
374
375
377
380 }
382 }
384 }
385 }
static void ftc_cache_resize(FTC_Cache cache)
static void ftc_node_mru_unlink(FTC_Node node, FTC_Manager manager)
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static unsigned __int64 next
Referenced by ftc_cache_done().
◆ ftc_cache_done()
Definition at line 389 of file ftccache.c.
390 {
392 {
394
395
397
402
404 }
405 }
static void FTC_Cache_Clear(FTC_Cache cache)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
static char memory[1024 *256]
Referenced by FTC_Cache_Done().
◆ FTC_Cache_Done()
◆ FTC_Cache_Init()
◆ ftc_cache_init()
Definition at line 335 of file ftccache.c.
336 {
339
340
344
347 }
#define FTC_HASH_INITIAL_SIZE
#define FTC_HASH_MAX_LOAD
#define FT_NEW_ARRAY(ptr, count)
Referenced by FTC_Cache_Init().
◆ FTC_Cache_NewNode()
Definition at line 444 of file ftccache.c.
448 {
451
452
453
454
455
456
457
458
460 {
462 }
464
467 else
468 {
469
470
471
473 }
474
477 }
static void ftc_cache_add(FTC_Cache cache, FT_Offset hash, FTC_Node node)
#define FTC_CACHE_TRYLOOP_END(list_changed)
#define FTC_CACHE_TRYLOOP(cache)
◆ FTC_Cache_RemoveFaceID()
Definition at line 564 of file ftccache.c.
566 {
570
571
574 {
577
578
579 for (;;)
580 {
583
584
586 break;
587
588 if (
cache->clazz.node_remove_faceid(
node, face_id,
589 cache, &list_changed ) )
590 {
594 }
595 else
597 }
598 }
599
600
601 while ( frees )
602 {
604
605
608
611
613
615 }
616
618 }
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Referenced by FTC_Manager_RemoveFaceID().
◆ ftc_cache_resize()
Definition at line 113 of file ftccache.c.
114 {
115 for (;;)
116 {
121
122
123
124 if (
cache->slack < 0 )
125 {
127
128
129
130
131
133 {
136
137
138
140 (
mask + 1 ) * 2, (
mask + 1 ) * 4 ) )
141 break;
142 }
143
144
145 pnode =
cache->buckets +
p;
146
147 for (;;)
148 {
151 break;
152
154 {
156 node->link = new_list;
158 }
159 else
161 }
162
164
166
168 {
171 }
172 else
174 }
175
176
178 {
179 FT_UFast old_index =
p +
mask;
181
182
184 break;
185
187 {
190
191
192
195 break;
196
199 }
200 else
202
203 pnode =
cache->buckets +
p;
204 while ( *pnode )
205 pnode = &(*pnode)->
link;
206
207 pold =
cache->buckets + old_index;
208 *pnode = *pold;
210
213 }
214
215
216 else
217 break;
218 }
219 }
#define FTC_HASH_SUB_LOAD
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
Referenced by FTC_Cache_Clear(), FTC_Cache_RemoveFaceID(), ftc_node_hash_link(), and ftc_node_hash_unlink().
◆ ftc_node_destroy()
Definition at line 273 of file ftccache.c.
275 {
277
278
279#ifdef FT_DEBUG_ERROR
280
282 {
283 FT_TRACE0((
"ftc_node_destroy: invalid node handle\n" ));
284 return;
285 }
286#endif
287
289
290#ifdef FT_DEBUG_ERROR
292 {
293 FT_TRACE0((
"ftc_node_destroy: invalid node handle\n" ));
294 return;
295 }
296#endif
297
299
300
302
303
305
306
308
309#if 0
310
312 FT_TRACE0((
"ftc_node_destroy: invalid cache node count (%d)\n",
314#endif
315 }
static void ftc_node_hash_unlink(FTC_Node node0, FTC_Cache cache)
#define FT_TRACE0(varformat)
FTC_Cache caches[FTC_MAX_CACHES]
Referenced by FTC_Manager_Compress(), and FTC_Manager_FlushN().
◆ ftc_node_hash_link()
Definition at line 257 of file ftccache.c.
259 {
261
262
265
268 }
#define FTC_NODE_TOP_FOR_HASH(cache, hash)
Referenced by ftc_cache_add().
◆ ftc_node_hash_unlink()
Definition at line 224 of file ftccache.c.
226 {
228
229
230 for (;;)
231 {
233
234
236 {
237 FT_TRACE0((
"ftc_node_hash_unlink: unknown node\n" ));
238 return;
239 }
240
242 break;
243
244 pnode = &(*pnode)->
link;
245 }
246
247 *pnode = node0->
link;
249
252 }
Referenced by ftc_node_destroy().
◆ ftc_node_mru_link()
Definition at line 49 of file ftccache.c.
51 {
53
54
58 }
FTC_MruNode_Prepend(FTC_MruNode *plist, FTC_MruNode node)
typedefFT_BEGIN_HEADER struct FTC_MruNodeRec_ * FTC_MruNode
Referenced by ftc_cache_add().
◆ ftc_node_mru_unlink()