ref: 603292d7b0b2f391bcb11785a74a0b26fd727595
parent: 516342534468565abf0dafbd5bbb2891bfc19990
author: Behdad Esfahbod <[email protected]>
date: Wed Jan 14 13:35:56 EST 2015
[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'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2015-01-14 Behdad Esfahbod <[email protected]>
+ [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 <[email protected]>
+
[base] Don't allocate `library->raster_pool' anymore.
It's unused after the following commits:
--- a/include/internal/ftobjs.h
+++ b/include/internal/ftobjs.h
@@ -740,9 +740,8 @@
/* 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_
{
--- 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 );