|
|
|
@ -101,22 +101,22 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
ftc_gcache_init( FTC_Cache ftccache ) |
|
|
|
|
ftc_gcache_init( FTC_Cache cache ) |
|
|
|
|
{ |
|
|
|
|
FTC_GCache cache = (FTC_GCache)ftccache; |
|
|
|
|
FTC_GCache gcache = (FTC_GCache)cache; |
|
|
|
|
FT_Error error; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error = FTC_Cache_Init( FTC_CACHE( cache ) ); |
|
|
|
|
error = FTC_Cache_Init( cache ); |
|
|
|
|
if ( !error ) |
|
|
|
|
{ |
|
|
|
|
FTC_GCacheClass clazz = (FTC_GCacheClass)FTC_CACHE( cache )->org_class; |
|
|
|
|
FTC_GCacheClass clazz = (FTC_GCacheClass)cache->org_class; |
|
|
|
|
|
|
|
|
|
FTC_MruList_Init( &cache->families, |
|
|
|
|
FTC_MruList_Init( &gcache->families, |
|
|
|
|
clazz->family_class, |
|
|
|
|
0, /* no maximum here! */ |
|
|
|
|
cache, |
|
|
|
|
FTC_CACHE( cache )->memory ); |
|
|
|
|
cache->memory ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return error; |
|
|
|
@ -126,31 +126,31 @@ |
|
|
|
|
#if 0 |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
FTC_GCache_Init( FTC_GCache cache ) |
|
|
|
|
FTC_GCache_Init( FTC_GCache gcache ) |
|
|
|
|
{ |
|
|
|
|
return ftc_gcache_init( FTC_CACHE( cache ) ); |
|
|
|
|
return ftc_gcache_init( FTC_CACHE( gcache ) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif /* 0 */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( void ) |
|
|
|
|
ftc_gcache_done( FTC_Cache ftccache ) |
|
|
|
|
ftc_gcache_done( FTC_Cache cache ) |
|
|
|
|
{ |
|
|
|
|
FTC_GCache cache = (FTC_GCache)ftccache; |
|
|
|
|
FTC_GCache gcache = (FTC_GCache)cache; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FTC_Cache_Done( (FTC_Cache)cache ); |
|
|
|
|
FTC_MruList_Done( &cache->families ); |
|
|
|
|
FTC_Cache_Done( cache ); |
|
|
|
|
FTC_MruList_Done( &gcache->families ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( void ) |
|
|
|
|
FTC_GCache_Done( FTC_GCache cache ) |
|
|
|
|
FTC_GCache_Done( FTC_GCache gcache ) |
|
|
|
|
{ |
|
|
|
|
ftc_gcache_done( FTC_CACHE( cache ) ); |
|
|
|
|
ftc_gcache_done( FTC_CACHE( gcache ) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif /* 0 */ |
|
|
|
@ -169,7 +169,7 @@ |
|
|
|
|
#ifndef FTC_INLINE |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
FTC_GCache_Lookup( FTC_GCache cache, |
|
|
|
|
FTC_GCache_Lookup( FTC_GCache gcache, |
|
|
|
|
FT_Offset hash, |
|
|
|
|
FT_UInt gindex, |
|
|
|
|
FTC_GQuery query, |
|
|
|
@ -190,7 +190,7 @@ |
|
|
|
|
/* out-of-memory condition occurs during glyph node initialization. */ |
|
|
|
|
family->num_nodes++; |
|
|
|
|
|
|
|
|
|
error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query, anode ); |
|
|
|
|
error = FTC_Cache_Lookup( FTC_CACHE( gcache ), hash, query, anode ); |
|
|
|
|
|
|
|
|
|
if ( --family->num_nodes == 0 ) |
|
|
|
|
FTC_FAMILY_FREE( family, cache ); |
|
|
|
|