From fa791414601df61d20d860299dba80fdb62565df Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 21 Jun 2013 10:45:51 +0200 Subject: Upgraded freetype to 2.5.0.1 --- freetype/src/smooth/ftspic.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'freetype/src/smooth/ftspic.c') diff --git a/freetype/src/smooth/ftspic.c b/freetype/src/smooth/ftspic.c index 4714828fc..67a2b8310 100644 --- a/freetype/src/smooth/ftspic.c +++ b/freetype/src/smooth/ftspic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for smooth module. */ /* */ -/* Copyright 2009, 2010, 2012 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,17 +22,19 @@ #include "ftspic.h" #include "ftsmerrs.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from ftgrays.c */ void FT_Init_Class_ft_grays_raster( FT_Raster_Funcs* funcs ); + void ft_smooth_renderer_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->smooth ) @@ -42,6 +44,7 @@ if ( --container->ref_count ) return; + FT_FREE( container ); pic_container->smooth = NULL; } @@ -52,7 +55,7 @@ ft_smooth_renderer_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = Smooth_Err_Ok; + FT_Error error = FT_Err_Ok; SmoothPIC* container = NULL; FT_Memory memory = library->memory; @@ -66,37 +69,45 @@ } /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->smooth = container; + container->ref_count = 1; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ FT_Init_Class_ft_grays_raster( &container->ft_grays_raster ); -/*Exit:*/ - if ( error ) - ft_smooth_renderer_class_pic_free( library ); + return error; } + /* re-route these init and free functions to the above functions */ - FT_Error ft_smooth_lcd_renderer_class_pic_init( FT_Library library ) + FT_Error + ft_smooth_lcd_renderer_class_pic_init( FT_Library library ) { return ft_smooth_renderer_class_pic_init( library ); } - void ft_smooth_lcd_renderer_class_pic_free( FT_Library library ) + + void + ft_smooth_lcd_renderer_class_pic_free( FT_Library library ) { ft_smooth_renderer_class_pic_free( library ); } - FT_Error ft_smooth_lcdv_renderer_class_pic_init( FT_Library library ) + + FT_Error + ft_smooth_lcdv_renderer_class_pic_init( FT_Library library ) { return ft_smooth_renderer_class_pic_init( library ); } - void ft_smooth_lcdv_renderer_class_pic_free( FT_Library library ) + + void + ft_smooth_lcdv_renderer_class_pic_free( FT_Library library ) { ft_smooth_renderer_class_pic_free( library ); } -- cgit v1.2.3