zenilib: zenilib/jni/external/freetype2/src/cache/ftccache.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
ftccache.h File Reference
`#include "ftcmru.h"`

Go to the source code of this file.

## Classes

struct | FTC_CacheClassRec_
struct | FTC_CacheRec_
struct | FTC_NodeRec_

## Macros

#define | _FTC_FACE_ID_HASH(i) ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))
#define | FTC_CACHE(x) ( (FTC_Cache)(x) )
#define | FTC_CACHE_LOOKUP_CMP(cache, nodecmp, hash, query, node, error)
#define | FTC_CACHE_P(x) ( (FTC_Cache*)(x) )
#define | FTC_CACHE_TRYLOOP(cache)
#define | FTC_CACHE_TRYLOOP_END(list_changed)
#define | FTC_NODE(x) ( (FTC_Node)(x) )
#define | FTC_NODE__NEXT(x) FTC_NODE( (x)->mru.next )
#define | FTC_NODE__PREV(x) FTC_NODE( (x)->mru.prev )
#define | FTC_NODE__TOP_FOR_HASH(cache, hash)
#define | FTC_NODE_P(x) ( (FTC_Node*)(x) )

## Typedefs

typedef struct FTC_CacheRec_ * | FTC_Cache
typedef void(* | FTC_Cache_DoneFunc )(FTC_Cache cache)
typedef FT_Error(* | FTC_Cache_InitFunc )(FTC_Cache cache)
typedef struct FTC_CacheClassRec_ * | FTC_CacheClass
typedef struct FTC_CacheClassRec_ | FTC_CacheClassRec
typedef struct FTC_CacheRec_ | FTC_CacheRec
typedef FT_Bool(* | FTC_Node_CompareFunc )(FTC_Node node, FT_Pointer key, FTC_Cache cache, FT_Bool *list_changed)
typedef void(* | FTC_Node_FreeFunc )(FTC_Node node, FTC_Cache cache)
typedef FT_Error(* | FTC_Node_NewFunc )(FTC_Node *pnode, FT_Pointer query, FTC_Cache cache)
typedef FT_Offset(* | FTC_Node_WeightFunc )(FTC_Node node, FTC_Cache cache)
typedef struct FTC_NodeRec_ | FTC_NodeRec

## Functions

| FTC_Cache_Done (FTC_Cache cache)
| FTC_Cache_Init (FTC_Cache cache)
| FTC_Cache_NewNode (FTC_Cache cache, FT_PtrDist hash, FT_Pointer query, FTC_Node *anode)
| FTC_Cache_RemoveFaceID (FTC_Cache cache, FTC_FaceID face_id)

## Macro Definition Documentation

#define _FTC_FACE_ID_HASH | ( |  | i | ) | ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))

Definition at line 28 of file ftccache.h.

#define FTC_CACHE | ( |  | x | ) | ( (FTC_Cache)(x) )

Definition at line 168 of file ftccache.h.

Referenced by FTC_CMapCache_Lookup(), and ftc_gcache_init().

#define FTC_CACHE_LOOKUP_CMP | ( |  | cache,
|  |  | nodecmp,
|  |  | hash,
|  |  | query,
|  |  | node,
|  |  | error
| ) |  |

Definition at line 217 of file ftccache.h.

Referenced by FTC_CMapCache_Lookup().

#define FTC_CACHE_P | ( |  | x | ) | ( (FTC_Cache*)(x) )

Definition at line 169 of file ftccache.h.

Referenced by FTC_CMapCache_New().

#define FTC_CACHE_TRYLOOP | ( |  | cache | ) |

Value:
{ \
FTC_Manager _try_manager = FTC_CACHE( cache )->manager; \
FT_UInt _try_count = 4; \
\
\
for (;;) \
{ \
FT_UInt _try_done;
for
for(;;)
Definition: glslang_tab.cpp:4773
FTC_Manager
struct FTC_ManagerRec_ * FTC_Manager
Definition: ftcache.h:261
FTC_CACHE
#define FTC_CACHE(x)
Definition: ftccache.h:168
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227

Definition at line 319 of file ftccache.h.

Referenced by FTC_Cache_NewNode(), and ftc_snode_compare().

#define FTC_CACHE_TRYLOOP_END | ( |  | list_changed | ) |

Value:
if ( !error || error != FTC_Err_Out_Of_Memory ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
if ( _try_done > 0 && ( list_changed ) ) \
*(FT_Bool*)( list_changed ) = TRUE; \
\
if ( _try_done == 0 ) \
break; \
\
if ( _try_done == _try_count ) \
{ \
_try_count *= 2; \
if ( _try_count < _try_done || \
_try_count > _try_manager->num_nodes ) \
_try_count = _try_manager->num_nodes; \
} \
} \
}
FTC_Manager_FlushN
FTC_Manager_FlushN(FTC_Manager manager, FT_UInt count)
Definition: ftcmanag.c:626
if
if(!yyg->yy_init)
Definition: glslang_lex.cpp:1037
FT_Bool
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
error
FT_Error error
Definition: cffdrivr.c:407
TRUE
#define TRUE
Definition: ftobjs.h:53

Definition at line 330 of file ftccache.h.

Referenced by FTC_Cache_NewNode(), and ftc_snode_compare().

#define FTC_NODE | ( |  | x | ) | ( (FTC_Node)(x) )

Definition at line 70 of file ftccache.h.

Referenced by FTC_GNode_Compare(), FTC_INode_Free(), FTC_SNode_Compare(), and FTC_SNode_Free().

#define FTC_NODE__NEXT | ( |  | x | ) | FTC_NODE( (x)->mru.next )

Definition at line 73 of file ftccache.h.

#define FTC_NODE__PREV | ( |  | x | ) | FTC_NODE( (x)->mru.prev )

Definition at line 74 of file ftccache.h.

Referenced by FTC_Manager_Compress(), and FTC_Manager_FlushN().

#define FTC_NODE__TOP_FOR_HASH | ( |  | cache,
|  |  | hash
| ) |  |

Value:
( ( cache )->buckets + \
( ( ( ( hash ) & ( cache )->mask ) < ( cache )->p ) \
? ( ( hash ) & ( ( cache )->mask * 2 + 1 ) ) \
: ( ( hash ) & ( cache )->mask ) ) )
p
GLfloat GLfloat p
Definition: glew.h:14938
mask
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
Definition: gl2ext.h:961

Definition at line 77 of file ftccache.h.

Referenced by ftc_node_hash_link(), and ftc_node_hash_unlink().

#define FTC_NODE_P | ( |  | x | ) | ( (FTC_Node*)(x) )

Definition at line 71 of file ftccache.h.

## Typedef Documentation

typedef struct FTC_CacheRec_* FTC_Cache

Definition at line 32 of file ftccache.h.

typedef void(* FTC_Cache_DoneFunc)(FTC_Cache cache)

Definition at line 131 of file ftccache.h.

typedef FT_Error(* FTC_Cache_InitFunc)(FTC_Cache cache)

Definition at line 128 of file ftccache.h.

typedef struct FTC_CacheClassRec_* FTC_CacheClass

Definition at line 35 of file ftccache.h.

typedef struct FTC_CacheClassRec_ FTC_CacheClassRec

typedef struct FTC_CacheRec_ FTC_CacheRec

typedef FT_Bool(* FTC_Node_CompareFunc)(FTC_Node node, FT_Pointer key, FTC_Cache cache, FT_Bool *list_changed)

Definition at line 117 of file ftccache.h.

typedef void(* FTC_Node_FreeFunc)(FTC_Node node, FTC_Cache cache)

Definition at line 124 of file ftccache.h.

typedef FT_Error(* FTC_Node_NewFunc)(FTC_Node *pnode, FT_Pointer query, FTC_Cache cache)

Definition at line 107 of file ftccache.h.

typedef FT_Offset(* FTC_Node_WeightFunc)(FTC_Node node, FTC_Cache cache)

Definition at line 112 of file ftccache.h.

typedef struct FTC_NodeRec_ FTC_NodeRec

## Function Documentation

FTC_Cache_Done | ( | FTC_Cache | cache | ) |

Definition at line 414 of file ftccache.c.

References ftc_cache_done().

Referenced by ftc_gcache_done().

FTC_Cache_Init | ( | FTC_Cache | cache | ) |

Definition at line 333 of file ftccache.c.

References ftc_cache_init().

Referenced by ftc_gcache_init().

FTC_Cache_NewNode | ( | FTC_Cache | cache,
|  | FT_PtrDist | hash,
|  | FT_Pointer | query,
|  | FTC_Node * | anode
| ) |  |

Definition at line 449 of file ftccache.c.

References error, ftc_cache_add(), FTC_CACHE_TRYLOOP, FTC_CACHE_TRYLOOP_END, and NULL.

FTC_Cache_RemoveFaceID | ( | FTC_Cache | cache,
|  | FTC_FaceID | face_id
| ) |  |

Definition at line 569 of file ftccache.c.

References FTC_ManagerRec_::cur_weight, FALSE, FT_Bool, ftc_cache_resize(), ftc_node_mru_unlink(), i, FTC_NodeRec_::link, and NULL.

Referenced by FTC_Manager_RemoveFaceID().