diff options
Diffstat (limited to 'src/cache/ftcimage.c')
-rw-r--r-- | src/cache/ftcimage.c | 60 |
1 files changed, 14 insertions, 46 deletions
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index 02020bac3..b7d6cdfcb 100644 --- a/src/cache/ftcimage.c +++ b/src/cache/ftcimage.c @@ -21,17 +21,15 @@ #include FT_CACHE_INTERNAL_IMAGE_H #include FT_INTERNAL_MEMORY_H -#include "ftccback.h" #include "ftcerror.h" /* finalize a given glyph image node */ - FT_LOCAL_DEF( void ) - ftc_inode_free( FTC_Node ftcinode, - FTC_Cache cache ) + FT_EXPORT_DEF( void ) + FTC_INode_Free( FTC_INode inode, + FTC_GCache cache ) { - FTC_INode inode = (FTC_INode)ftcinode; - FT_Memory memory = cache->memory; + FT_Memory memory = FTC_CACHE__MEMORY(cache); if ( inode->glyph ) @@ -40,26 +38,18 @@ inode->glyph = NULL; } - FTC_GNode_Done( FTC_GNODE( inode ), cache ); + FTC_GNode_Done( FTC_GNODE( inode ) ); FT_FREE( inode ); } - FT_EXPORT_DEF( void ) - FTC_INode_Free( FTC_INode inode, - FTC_Cache cache ) - { - ftc_inode_free( FTC_NODE( inode ), cache ); - } - - /* initialize a new glyph image node */ FT_EXPORT_DEF( FT_Error ) FTC_INode_New( FTC_INode *pinode, - FTC_GQuery gquery, - FTC_Cache cache ) + FTC_GNode gquery, + FTC_GCache cache ) { - FT_Memory memory = cache->memory; + FT_Memory memory = FTC_CACHE__MEMORY(cache); FT_Error error; FTC_INode inode; @@ -69,15 +59,16 @@ FTC_GNode gnode = FTC_GNODE( inode ); FTC_Family family = gquery->family; FT_UInt gindex = gquery->gindex; - FTC_IFamilyClass clazz = FTC_CACHE__IFAMILY_CLASS( cache ); + FTC_ICacheClass clazz = FTC_ICACHE__CLASS( cache ); /* initialize its inner fields */ FTC_GNode_Init( gnode, gindex, family ); /* we will now load the glyph image */ - error = clazz->family_load_glyph( family, gindex, cache, - &inode->glyph ); + error = clazz->fam_load_glyph( family, gindex, + FTC_CACHE__MANAGER(cache), + &inode->glyph ); if ( error ) { FTC_INode_Free( inode, cache ); @@ -90,29 +81,13 @@ } - FT_LOCAL_DEF( FT_Error ) - ftc_inode_new( FTC_Node *ftcpinode, - FT_Pointer ftcgquery, - FTC_Cache cache ) - { - FTC_INode *pinode = (FTC_INode*)ftcpinode; - FTC_GQuery gquery = (FTC_GQuery)ftcgquery; - - - return FTC_INode_New( pinode, gquery, cache ); - } - - FT_LOCAL_DEF( FT_ULong ) - ftc_inode_weight( FTC_Node ftcinode, - FTC_Cache ftccache ) + FT_EXPORT_DEF( FT_ULong ) + FTC_INode_Weight( FTC_INode inode ) { - FTC_INode inode = (FTC_INode)ftcinode; FT_ULong size = 0; FT_Glyph glyph = inode->glyph; - FT_UNUSED( ftccache ); - switch ( glyph->format ) { @@ -149,11 +124,4 @@ } - FT_EXPORT_DEF( FT_ULong ) - FTC_INode_Weight( FTC_INode inode ) - { - return ftc_inode_weight( FTC_NODE( inode ), NULL ); - } - - /* END */ |