diff --git a/ChangeLog b/ChangeLog index 6aca6373e..62bb09992 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-01-14 Behdad Esfahbod + + [base] Don't initialize unused `driver->glyph_loader'. + + * src/base/ftobjs.c (Destroy_Driver): Don't call + `FT_GlyphLoader_Done'. + (FT_Add_Module): Don't call `FT_GlyphLoader_New'. + 2015-01-14 Behdad Esfahbod [base] Don't allocate `library->raster_pool' anymore. diff --git a/include/internal/ftobjs.h b/include/internal/ftobjs.h index b45a5ed81..2014a95eb 100644 --- a/include/internal/ftobjs.h +++ b/include/internal/ftobjs.h @@ -740,9 +740,8 @@ FT_BEGIN_HEADER /* faces_list :: The list of faces currently opened by this */ /* driver. */ /* */ - /* glyph_loader :: The glyph loader for all faces managed by this */ - /* driver. This object isn't defined for unscalable */ - /* formats. */ + /* glyph_loader :: Unused. Used to be glyph loader for all faces */ + /* managed by this driver. */ /* */ typedef struct FT_DriverRec_ { diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index ba5a24b87..d3a120924 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -968,10 +968,6 @@ (FT_List_Destructor)destroy_face, driver->root.memory, driver ); - - /* check whether we need to drop the driver's glyph loader */ - if ( FT_DRIVER_USES_OUTLINES( driver ) ) - FT_GlyphLoader_Done( driver->glyph_loader ); } @@ -4313,17 +4309,10 @@ /* if the module is a font driver */ if ( FT_MODULE_IS_DRIVER( module ) ) { - /* allocate glyph loader if needed */ FT_Driver driver = FT_DRIVER( module ); driver->clazz = (FT_Driver_Class)module->clazz; - if ( FT_DRIVER_USES_OUTLINES( driver ) ) - { - error = FT_GlyphLoader_New( memory, &driver->glyph_loader ); - if ( error ) - goto Fail; - } } if ( clazz->module_init ) @@ -4340,15 +4329,6 @@ return error; Fail: - if ( FT_MODULE_IS_DRIVER( module ) ) - { - FT_Driver driver = FT_DRIVER( module ); - - - if ( FT_DRIVER_USES_OUTLINES( driver ) ) - FT_GlyphLoader_Done( driver->glyph_loader ); - } - if ( FT_MODULE_IS_RENDERER( module ) ) { FT_Renderer renderer = FT_RENDERER( module );