diff options
author | marha <marha@users.sourceforge.net> | 2010-08-06 11:48:36 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-08-06 11:48:36 +0000 |
commit | 20ff8ddf2d9bb41050d10bbc75d61b9161880c7c (patch) | |
tree | 22566fcd9663b2baa565cd0c64eaa662d6ba03ee /freetype/src/raster | |
parent | c29011f2831315d3da9c4727c1e626d80520b97a (diff) | |
parent | 6849d83857b4e470a44ad8b6aa5cfb283fd64c89 (diff) | |
download | vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.tar.gz vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.tar.bz2 vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.zip |
svn merge ^/branches/released .
Diffstat (limited to 'freetype/src/raster')
-rw-r--r-- | freetype/src/raster/ftmisc.h | 16 | ||||
-rw-r--r-- | freetype/src/raster/ftraster.c | 17 | ||||
-rw-r--r-- | freetype/src/raster/rastpic.c | 13 |
3 files changed, 29 insertions, 17 deletions
diff --git a/freetype/src/raster/ftmisc.h b/freetype/src/raster/ftmisc.h index f04b5404b..7773924fe 100644 --- a/freetype/src/raster/ftmisc.h +++ b/freetype/src/raster/ftmisc.h @@ -5,7 +5,7 @@ /* Miscellaneous macros for stand-alone rasterizer (specification */ /* only). */ /* */ -/* Copyright 2005, 2009 by */ +/* Copyright 2005, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ @@ -27,6 +27,7 @@ #ifndef __FTMISC_H__ #define __FTMISC_H__ + /* memset */ #include FT_CONFIG_STANDARD_LIBRARY_H @@ -35,6 +36,7 @@ #define FT_LOCAL_DEF( x ) static x + /* from include/freetype2/fttypes.h */ typedef unsigned char FT_Byte; @@ -77,12 +79,22 @@ } FT_MemoryRec; + /* from src/ftcalc.c */ -#include <inttypes.h> +#if ( defined _WIN32 || defined _WIN64 ) + + typedef __int64 FT_Int64; + +#else + +#include "inttypes.h" typedef int64_t FT_Int64; +#endif + + static FT_Long FT_MulDiv( FT_Long a, FT_Long b, diff --git a/freetype/src/raster/ftraster.c b/freetype/src/raster/ftraster.c index 912c2310f..bf34d1d58 100644 --- a/freetype/src/raster/ftraster.c +++ b/freetype/src/raster/ftraster.c @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009 by */ +/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1122,13 +1122,13 @@ if ( Dx > 0 ) { - Ix = ( ras.precision * Dx ) / Dy; + Ix = SMulDiv( ras.precision, Dx, Dy); Rx = ( ras.precision * Dx ) % Dy; Dx = 1; } else { - Ix = -( ( ras.precision * -Dx ) / Dy ); + Ix = SMulDiv( ras.precision, -Dx, Dy) * -1; Rx = ( ras.precision * -Dx ) % Dy; Dx = -1; } @@ -3400,7 +3400,7 @@ } -#else /* _STANDALONE_ */ +#else /* !_STANDALONE_ */ static int @@ -3408,7 +3408,7 @@ PRaster *araster ) { FT_Error error; - PRaster raster; + PRaster raster = NULL; *araster = 0; @@ -3432,7 +3432,7 @@ } -#endif /* _STANDALONE_ */ +#endif /* !_STANDALONE_ */ static void @@ -3447,9 +3447,8 @@ PWorker worker = (PWorker)pool_base; - raster->buffer = pool_base + ( (sizeof ( *worker ) + 7 ) & ~7 ); - raster->buffer_size = ( ( pool_base + pool_size ) - - (char*)raster->buffer ) / sizeof ( Long ); + raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 ); + raster->buffer_size = pool_base + pool_size - (char*)raster->buffer; raster->worker = worker; } else diff --git a/freetype/src/raster/rastpic.c b/freetype/src/raster/rastpic.c index 38bd4dd88..404aa0e8c 100644 --- a/freetype/src/raster/rastpic.c +++ b/freetype/src/raster/rastpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for raster module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2010 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -43,16 +43,17 @@ FT_Error - ft_raster1_renderer_class_pic_init( FT_Library library ) + ft_raster1_renderer_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = FT_Err_Ok; - RasterPIC* container; - FT_Memory memory = library->memory; + FT_Error error = Raster_Err_Ok; + RasterPIC* container; + FT_Memory memory = library->memory; + /* since this function also serve raster5 renderer, it implements reference counting */ - if(pic_container->raster) + if ( pic_container->raster ) { ((RasterPIC*)pic_container->raster)->ref_count++; return error; |