Commit e99b26aadae8fa057debf995e4b8017e18c2b995

Werner Lemberg 2017-05-14T21:57:27

Remove remnants of raster pool. * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove `raster_pool' and `raster_pool_size' fields. * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.

diff --git a/ChangeLog b/ChangeLog
index b81af15..0c22bdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-05-14  Werner Lemberg  <wl@gnu.org>
+
+	Remove remnants of raster pool.
+
+	* include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove
+	`raster_pool' and `raster_pool_size' fields.
+
+	* src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c
+	(ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.
+
 2017-05-13  Werner Lemberg  <wl@gnu.org>
 
 	* Version 2.8 released.
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index 1a049ef..1c789e5 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -1064,24 +1064,24 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    FreeType used to provide an area of memory called the `render      */
-  /*    pool' available to all registered rasters.  This was not thread    */
-  /*    safe however and now FreeType never allocates this pool.  NULL     */
-  /*    is always passed in as pool_base.                                  */
+  /*    pool' available to all registered rasterizers.  This was not       */
+  /*    thread safe, however, and now FreeType never allocates this pool.  */
   /*                                                                       */
-  /*    This function is called each time the render pool changes, or just */
-  /*    after a new raster object is created.                              */
+  /*    This function is called after a new raster object is created.      */
   /*                                                                       */
   /* <Input>                                                               */
   /*    raster    :: A handle to the new raster object.                    */
   /*                                                                       */
-  /*    pool_base :: The address in memory of the render pool.             */
+  /*    pool_base :: Previously, the address in memory of the render pool. */
+  /*                 Set this to NULL.                                     */
   /*                                                                       */
-  /*    pool_size :: The size in bytes of the render pool.                 */
+  /*    pool_size :: Previously, the size in bytes of the render pool.     */
+  /*                 Set this to 0.                                        */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    Rasters should ignore the render pool and rely on dynamic or stack */
-  /*    allocation if they want to (a handle to the memory allocator is    */
-  /*    passed to the raster constructor).                                 */
+  /*    Rasterizers should rely on dynamic or stack allocation if they     */
+  /*    want to (a handle to the memory allocator is passed to the         */
+  /*    rasterizer constructor).                                           */
   /*                                                                       */
   typedef void
   (*FT_Raster_ResetFunc)( FT_Raster       raster,
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 5584091..06b6597 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -856,11 +856,6 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    auto_hinter      :: The auto-hinter module interface.              */
   /*                                                                       */
-  /*    raster_pool      :: The raster object's render pool.  This can     */
-  /*                        ideally be changed dynamically at run-time.    */
-  /*                                                                       */
-  /*    raster_pool_size :: The size of the render pool in bytes.          */
-  /*                                                                       */
   /*    debug_hooks      :: An array of four function pointers that allow  */
   /*                        debuggers to hook into a font format's         */
   /*                        interpreter.  Currently, only the TrueType     */
@@ -903,10 +898,6 @@ FT_BEGIN_HEADER
     FT_Renderer        cur_renderer;     /* current outline renderer */
     FT_Module          auto_hinter;
 
-    FT_Byte*           raster_pool;      /* scan-line conversion */
-                                         /* render pool          */
-    FT_ULong           raster_pool_size; /* size of render pool in bytes */
-
     FT_DebugHook_Func  debug_hooks[4];
 
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 539116e..75e4988 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4973,10 +4973,6 @@
       goto Fail;
 #endif
 
-    /* we don't use raster_pool anymore. */
-    library->raster_pool_size = 0;
-    library->raster_pool      = NULL;
-
     library->version_major = FREETYPE_MAJOR;
     library->version_minor = FREETYPE_MINOR;
     library->version_patch = FREETYPE_PATCH;
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 1a83e9e..e52ca1d 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -31,12 +31,7 @@
   static FT_Error
   ft_raster1_init( FT_Renderer  render )
   {
-    FT_Library  library = FT_MODULE_LIBRARY( render );
-
-
-    render->clazz->raster_class->raster_reset( render->raster,
-                                               library->raster_pool,
-                                               library->raster_pool_size );
+    render->clazz->raster_class->raster_reset( render->raster, NULL, 0 );
 
     return FT_Err_Ok;
   }
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 435854e..cd7a87b 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -31,12 +31,7 @@
   static FT_Error
   ft_smooth_init( FT_Renderer  render )
   {
-    FT_Library  library = FT_MODULE_LIBRARY( render );
-
-
-    render->clazz->raster_class->raster_reset( render->raster,
-                                               library->raster_pool,
-                                               library->raster_pool_size );
+    render->clazz->raster_class->raster_reset( render->raster, NULL, 0 );
 
     return 0;
   }