ReactOS 0.4.15-dev-8241-g63935f8
ftcglyph.c File Reference
#include <ft2build.h>
#include "ftcglyph.h"
#include "ftccback.h"
#include "ftcerror.h"
Include dependency graph for ftcglyph.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 FTC_GNode_Init (FTC_GNode gnode, FT_UInt gindex, FTC_Family family)
 
 FTC_GNode_UnselectFamily (FTC_GNode gnode, FTC_Cache cache)
 
 FTC_GNode_Done (FTC_GNode gnode, FTC_Cache cache)
 
 ftc_gnode_compare (FTC_Node ftcgnode, FT_Pointer ftcgquery, FTC_Cache cache, FT_Bool *list_changed)
 
 FTC_GNode_Compare (FTC_GNode gnode, FTC_GQuery gquery, FTC_Cache cache, FT_Bool *list_changed)
 
 FTC_Family_Init (FTC_Family family, FTC_Cache cache)
 
 ftc_gcache_init (FTC_Cache ftccache)
 
 ftc_gcache_done (FTC_Cache ftccache)
 
 FTC_GCache_New (FTC_Manager manager, FTC_GCacheClass clazz, FTC_GCache *acache)
 

Function Documentation

◆ FTC_Family_Init()

FTC_Family_Init ( FTC_Family  family,
FTC_Cache  cache 
)

Definition at line 106 of file ftcglyph.c.

108 {
110
111
112 family->clazz = clazz->family_class;
113 family->num_nodes = 0;
114 family->cache = cache;
115 }
#define FTC_CACHE_GCACHE_CLASS(x)
Definition: ftcglyph.h:248
FTC_MruListClass family_class
Definition: ftcglyph.h:240
Definition: cache.c:49

Referenced by ftc_basic_family_init().

◆ ftc_gcache_done()

ftc_gcache_done ( FTC_Cache  ftccache)

Definition at line 153 of file ftcglyph.c.

154 {
155 FTC_GCache cache = (FTC_GCache)ftccache;
156
157
159 FTC_MruList_Done( &cache->families );
160 }
FTC_Cache_Done(FTC_Cache cache)
Definition: ftccache.c:409
struct FTC_GCacheRec_ * FTC_GCache
FTC_MruList_Done(FTC_MruList list)
Definition: ftcmru.c:195

◆ ftc_gcache_init()

ftc_gcache_init ( FTC_Cache  ftccache)

Definition at line 119 of file ftcglyph.c.

120 {
121 FTC_GCache cache = (FTC_GCache)ftccache;
123
124
126 if ( !error )
127 {
128 FTC_GCacheClass clazz = (FTC_GCacheClass)FTC_CACHE( cache )->org_class;
129
130 FTC_MruList_Init( &cache->families,
131 clazz->family_class,
132 0, /* no maximum here! */
133 cache,
134 FTC_CACHE( cache )->memory );
135 }
136
137 return error;
138 }
FTC_Cache_Init(FTC_Cache cache)
Definition: ftccache.c:328
#define FTC_CACHE(x)
Definition: ftccache.h:161
const FTC_GCacheClassRec * FTC_GCacheClass
Definition: ftcglyph.h:244
FTC_MruList_Init(FTC_MruList list, FTC_MruListClass clazz, FT_UInt max_nodes, FT_Pointer data, FT_Memory memory)
Definition: ftcmru.c:169
int FT_Error
Definition: fttypes.h:300
#define error(str)
Definition: mkdosfs.c:1605
static char memory[1024 *256]
Definition: process.c:116

◆ FTC_GCache_New()

FTC_GCache_New ( FTC_Manager  manager,
FTC_GCacheClass  clazz,
FTC_GCache acache 
)

Definition at line 175 of file ftcglyph.c.

178 {
179 return FTC_Manager_RegisterCache( manager, (FTC_CacheClass)clazz,
180 (FTC_Cache*)acache );
181 }
FTC_Manager_RegisterCache(FTC_Manager manager, FTC_CacheClass clazz, FTC_Cache *acache)
Definition: ftcmanag.c:580

Referenced by FTC_ImageCache_New(), and FTC_SBitCache_New().

◆ FTC_GNode_Compare()

FTC_GNode_Compare ( FTC_GNode  gnode,
FTC_GQuery  gquery,
FTC_Cache  cache,
FT_Bool list_changed 
)

Definition at line 86 of file ftcglyph.c.

90 {
91 return ftc_gnode_compare( FTC_NODE( gnode ), gquery,
92 cache, list_changed );
93 }
#define FTC_NODE(x)
Definition: ftccache.h:69
ftc_gnode_compare(FTC_Node ftcgnode, FT_Pointer ftcgquery, FTC_Cache cache, FT_Bool *list_changed)
Definition: ftcglyph.c:66

Referenced by FTC_ImageCache_Lookup(), and FTC_ImageCache_LookupScaler().

◆ ftc_gnode_compare()

ftc_gnode_compare ( FTC_Node  ftcgnode,
FT_Pointer  ftcgquery,
FTC_Cache  cache,
FT_Bool list_changed 
)

Definition at line 66 of file ftcglyph.c.

70 {
71 FTC_GNode gnode = (FTC_GNode)ftcgnode;
72 FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
74
75
76 if ( list_changed )
77 *list_changed = FALSE;
78 return FT_BOOL( gnode->family == gquery->family &&
79 gnode->gindex == gquery->gindex );
80 }
#define FALSE
Definition: types.h:117
struct FTC_GNodeRec_ * FTC_GNode
struct FTC_GQueryRec_ * FTC_GQuery
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
#define FT_BOOL(x)
Definition: fttypes.h:578
FT_UInt gindex
Definition: ftcglyph.h:152
FTC_Family family
Definition: ftcglyph.h:151
FTC_Family family
Definition: ftcglyph.h:163
FT_UInt gindex
Definition: ftcglyph.h:162

Referenced by FTC_GNode_Compare().

◆ FTC_GNode_Done()

FTC_GNode_Done ( FTC_GNode  gnode,
FTC_Cache  cache 
)

Definition at line 55 of file ftcglyph.c.

57 {
58 /* finalize the node */
59 gnode->gindex = 0;
60
62 }
FTC_GNode_UnselectFamily(FTC_GNode gnode, FTC_Cache cache)
Definition: ftcglyph.c:42

Referenced by ftc_inode_free(), and ftc_snode_free().

◆ FTC_GNode_Init()

FTC_GNode_Init ( FTC_GNode  gnode,
FT_UInt  gindex,
FTC_Family  family 
)

Definition at line 31 of file ftcglyph.c.

34 {
35 gnode->family = family;
36 gnode->gindex = gindex;
37 family->num_nodes++;
38 }

Referenced by FTC_INode_New(), and FTC_SNode_New().

◆ FTC_GNode_UnselectFamily()

FTC_GNode_UnselectFamily ( FTC_GNode  gnode,
FTC_Cache  cache 
)

Definition at line 42 of file ftcglyph.c.

44 {
45 FTC_Family family = gnode->family;
46
47
48 gnode->family = NULL;
49 if ( family && --family->num_nodes == 0 )
50 FTC_FAMILY_FREE( family, cache );
51 }
#define NULL
Definition: types.h:112
FT_BEGIN_HEADER struct FTC_FamilyRec_ * FTC_Family
#define FTC_FAMILY_FREE(family, cache)
Definition: ftcglyph.h:273

Referenced by ftc_basic_gnode_compare_faceid(), and FTC_GNode_Done().