зеркало из https://github.com/stride3d/freetype.git
Prepare source code for amalgamation (3/6).
* src/smooth/ftgrays.c: s/TWorker/black_TWorker/, s/PWorker/black_PWorker/. * src/raster/ftraster.c: s/TWorker/gray_TWorker/, s/PWorker/gray_PWorker/
This commit is contained in:
Родитель
5ccebc4e1e
Коммит
d55f16df11
|
@ -1,3 +1,12 @@
|
|||
2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Prepare source code for amalgamation (3/6).
|
||||
|
||||
* src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
|
||||
s/PWorker/black_PWorker/.
|
||||
* src/raster/ftraster.c: s/TWorker/gray_TWorker/,
|
||||
s/PWorker/gray_PWorker/
|
||||
|
||||
2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Prepare source code for amalgamation (2/6).
|
||||
|
|
|
@ -396,8 +396,8 @@
|
|||
#else /* !FT_STATIC_RASTER */
|
||||
|
||||
|
||||
#define RAS_ARGS PWorker worker,
|
||||
#define RAS_ARG PWorker worker
|
||||
#define RAS_ARGS black_PWorker worker,
|
||||
#define RAS_ARG black_PWorker worker
|
||||
|
||||
#define RAS_VARS worker,
|
||||
#define RAS_VAR worker
|
||||
|
@ -408,7 +408,7 @@
|
|||
#endif /* !FT_STATIC_RASTER */
|
||||
|
||||
|
||||
typedef struct TWorker_ TWorker, *PWorker;
|
||||
typedef struct black_TWorker_ black_TWorker, *black_PWorker;
|
||||
|
||||
|
||||
/* prototypes used for sweep function dispatch */
|
||||
|
@ -446,7 +446,7 @@
|
|||
/* Thus, their offset can be coded with less opcodes, resulting in a */
|
||||
/* smaller executable. */
|
||||
|
||||
struct TWorker_
|
||||
struct black_TWorker_
|
||||
{
|
||||
Int precision_bits; /* precision related variables */
|
||||
Int precision;
|
||||
|
@ -546,18 +546,18 @@
|
|||
|
||||
typedef struct TRaster_
|
||||
{
|
||||
char* buffer;
|
||||
long buffer_size;
|
||||
void* memory;
|
||||
PWorker worker;
|
||||
Byte grays[5];
|
||||
Short gray_width;
|
||||
char* buffer;
|
||||
long buffer_size;
|
||||
void* memory;
|
||||
black_PWorker worker;
|
||||
Byte grays[5];
|
||||
Short gray_width;
|
||||
|
||||
} TRaster, *PRaster;
|
||||
|
||||
#ifdef FT_STATIC_RASTER
|
||||
|
||||
static TWorker cur_ras;
|
||||
static black_TWorker cur_ras;
|
||||
#define ras cur_ras
|
||||
|
||||
#else /* !FT_STATIC_RASTER */
|
||||
|
@ -3485,9 +3485,9 @@
|
|||
{
|
||||
if ( raster )
|
||||
{
|
||||
if ( pool_base && pool_size >= (long)sizeof ( TWorker ) + 2048 )
|
||||
if ( pool_base && pool_size >= (long)sizeof ( black_TWorker ) + 2048 )
|
||||
{
|
||||
PWorker worker = (PWorker)pool_base;
|
||||
black_PWorker worker = (black_PWorker)pool_base;
|
||||
|
||||
|
||||
raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 );
|
||||
|
@ -3537,7 +3537,7 @@
|
|||
{
|
||||
const FT_Outline* outline = (const FT_Outline*)params->source;
|
||||
const FT_Bitmap* target_map = params->target;
|
||||
PWorker worker;
|
||||
black_PWorker worker;
|
||||
|
||||
|
||||
if ( !raster || !raster->buffer || !raster->buffer_size )
|
||||
|
|
|
@ -234,8 +234,8 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
|
||||
#ifndef FT_STATIC_RASTER
|
||||
|
||||
#define RAS_ARG PWorker worker
|
||||
#define RAS_ARG_ PWorker worker,
|
||||
#define RAS_ARG gray_PWorker worker
|
||||
#define RAS_ARG_ gray_PWorker worker,
|
||||
|
||||
#define RAS_VAR worker
|
||||
#define RAS_VAR_ worker,
|
||||
|
@ -315,15 +315,15 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
|
||||
typedef struct TCell_
|
||||
{
|
||||
TPos x; /* same with TWorker.ex */
|
||||
TCoord cover; /* same with TWorker.cover */
|
||||
TArea area;
|
||||
PCell next;
|
||||
TPos x; /* same with gray_TWorker.ex */
|
||||
TCoord cover; /* same with gray_TWorker.cover */
|
||||
TArea area;
|
||||
PCell next;
|
||||
|
||||
} TCell;
|
||||
|
||||
|
||||
typedef struct TWorker_
|
||||
typedef struct gray_TWorker_
|
||||
{
|
||||
TCoord ex, ey;
|
||||
TPos min_ex, max_ex;
|
||||
|
@ -334,7 +334,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
TCoord cover;
|
||||
int invalid;
|
||||
|
||||
PCell cells;
|
||||
PCell cells;
|
||||
FT_PtrDist max_cells;
|
||||
FT_PtrDist num_cells;
|
||||
|
||||
|
@ -368,23 +368,23 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
PCell* ycells;
|
||||
TPos ycount;
|
||||
|
||||
} TWorker, *PWorker;
|
||||
} gray_TWorker, *gray_PWorker;
|
||||
|
||||
|
||||
#ifndef FT_STATIC_RASTER
|
||||
#define ras (*worker)
|
||||
#else
|
||||
static TWorker ras;
|
||||
static gray_TWorker ras;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct TRaster_
|
||||
{
|
||||
void* buffer;
|
||||
long buffer_size;
|
||||
int band_size;
|
||||
void* memory;
|
||||
PWorker worker;
|
||||
void* buffer;
|
||||
long buffer_size;
|
||||
int band_size;
|
||||
void* memory;
|
||||
gray_PWorker worker;
|
||||
|
||||
} TRaster, *PRaster;
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
|
||||
static int
|
||||
gray_move_to( const FT_Vector* to,
|
||||
PWorker worker )
|
||||
gray_PWorker worker )
|
||||
{
|
||||
TPos x, y;
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
|
||||
static int
|
||||
gray_line_to( const FT_Vector* to,
|
||||
PWorker worker )
|
||||
gray_PWorker worker )
|
||||
{
|
||||
gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) );
|
||||
return 0;
|
||||
|
@ -1147,7 +1147,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
static int
|
||||
gray_conic_to( const FT_Vector* control,
|
||||
const FT_Vector* to,
|
||||
PWorker worker )
|
||||
gray_PWorker worker )
|
||||
{
|
||||
gray_render_conic( RAS_VAR_ control, to );
|
||||
return 0;
|
||||
|
@ -1158,7 +1158,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
gray_cubic_to( const FT_Vector* control1,
|
||||
const FT_Vector* control2,
|
||||
const FT_Vector* to,
|
||||
PWorker worker )
|
||||
gray_PWorker worker )
|
||||
{
|
||||
gray_render_cubic( RAS_VAR_ control1, control2, to );
|
||||
return 0;
|
||||
|
@ -1169,7 +1169,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
gray_render_span( int y,
|
||||
int count,
|
||||
const FT_Span* spans,
|
||||
PWorker worker )
|
||||
gray_PWorker worker )
|
||||
{
|
||||
unsigned char* p;
|
||||
FT_Bitmap* map = &worker->target;
|
||||
|
@ -1862,7 +1862,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
{
|
||||
const FT_Outline* outline = (const FT_Outline*)params->source;
|
||||
const FT_Bitmap* target_map = params->target;
|
||||
PWorker worker;
|
||||
gray_PWorker worker;
|
||||
|
||||
|
||||
if ( !raster || !raster->buffer || !raster->buffer_size )
|
||||
|
@ -2016,14 +2016,15 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
|
||||
if ( raster )
|
||||
{
|
||||
if ( pool_base && pool_size >= (long)sizeof ( TWorker ) + 2048 )
|
||||
if ( pool_base && pool_size >= (long)sizeof ( gray_TWorker ) + 2048 )
|
||||
{
|
||||
PWorker worker = (PWorker)pool_base;
|
||||
gray_PWorker worker = (gray_PWorker)pool_base;
|
||||
|
||||
|
||||
rast->worker = worker;
|
||||
rast->buffer = pool_base +
|
||||
( ( sizeof ( TWorker ) + sizeof ( TCell ) - 1 ) &
|
||||
( ( sizeof ( gray_TWorker ) +
|
||||
sizeof ( TCell ) - 1 ) &
|
||||
~( sizeof ( TCell ) - 1 ) );
|
||||
rast->buffer_size = (long)( ( pool_base + pool_size ) -
|
||||
(char*)rast->buffer ) &
|
||||
|
|
Загрузка…
Ссылка в новой задаче