zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ftccache.c File Reference
#include <ft2build.h>
#include "ftcmanag.h"
#include <FT_INTERNAL_OBJECTS_H>
#include <FT_INTERNAL_DEBUG_H>
#include "ftccback.h"
#include "ftcerror.h"

Go to the source code of this file.

Macros

#define FT_COMPONENT   trace_cache
 
#define FTC_HASH_INITIAL_SIZE   8
 
#define FTC_HASH_MAX_LOAD   2
 
#define FTC_HASH_MIN_LOAD   1
 
#define FTC_HASH_SUB_LOAD   ( FTC_HASH_MAX_LOAD - FTC_HASH_MIN_LOAD )
 

Functions

static void ftc_cache_add (FTC_Cache cache, FT_PtrDist hash, FTC_Node node)
 
static void FTC_Cache_Clear (FTC_Cache cache)
 
 ftc_cache_done (FTC_Cache cache)
 
 FTC_Cache_Done (FTC_Cache cache)
 
 FTC_Cache_Init (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)
 
static void ftc_cache_resize (FTC_Cache cache)
 
 ftc_node_destroy (FTC_Node node, FTC_Manager manager)
 
static void ftc_node_hash_link (FTC_Node node, FTC_Cache cache)
 
static void ftc_node_hash_unlink (FTC_Node node0, FTC_Cache cache)
 
static void ftc_node_mru_link (FTC_Node node, FTC_Manager manager)
 
static void ftc_node_mru_unlink (FTC_Node node, FTC_Manager manager)
 

Macro Definition Documentation

#define FT_COMPONENT   trace_cache

Definition at line 29 of file ftccache.c.

#define FTC_HASH_INITIAL_SIZE   8

Definition at line 37 of file ftccache.c.

Referenced by ftc_cache_init(), and ftc_cache_resize().

#define FTC_HASH_MAX_LOAD   2

Definition at line 32 of file ftccache.c.

Referenced by ftc_cache_init(), and ftc_cache_resize().

#define FTC_HASH_MIN_LOAD   1

Definition at line 33 of file ftccache.c.

#define FTC_HASH_SUB_LOAD   ( FTC_HASH_MAX_LOAD - FTC_HASH_MIN_LOAD )

Definition at line 34 of file ftccache.c.

Referenced by ftc_cache_resize().

Function Documentation

ftc_cache_done ( FTC_Cache  cache)

Definition at line 394 of file ftccache.c.

References FT_FREE, FTC_Cache_Clear(), and NULL.

Referenced by FTC_Cache_Done().

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_init ( FTC_Cache  cache)

Definition at line 340 of file ftccache.c.

References error, FT_NEW_ARRAY, FTC_HASH_INITIAL_SIZE, and FTC_HASH_MAX_LOAD.

Referenced by FTC_Cache_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 
)
static void ftc_node_hash_link ( FTC_Node  node,
FTC_Cache  cache 
)
static
static void ftc_node_hash_unlink ( FTC_Node  node0,
FTC_Cache  cache 
)
static
static void ftc_node_mru_link ( FTC_Node  node,
FTC_Manager  manager 
)
static

Definition at line 50 of file ftccache.c.

References FTC_MruNode_Prepend(), FTC_ManagerRec_::nodes_list, and FTC_ManagerRec_::num_nodes.

Referenced by ftc_cache_add().

static void ftc_node_mru_unlink ( FTC_Node  node,
FTC_Manager  manager 
)
static