mirror of https://github.com/freetype/freetype
(test) mulfix perf
This commit is contained in:
parent
57816b94c5
commit
bf2e25c73c
|
@ -1171,21 +1171,21 @@
|
||||||
FT_Vector pt; /* hinted point in upright DS */
|
FT_Vector pt; /* hinted point in upright DS */
|
||||||
|
|
||||||
|
|
||||||
pt.x = ADD_INT32( FT_MulFix( glyphpath->scaleX, x ),
|
pt.x = ADD_INT32( FT_MulFix( x, glyphpath->scaleX ),
|
||||||
FT_MulFix( glyphpath->scaleC, y ) );
|
FT_MulFix( y, glyphpath->scaleC ) );
|
||||||
pt.y = hintmap ? cf2_hintmap_map( hintmap, y )
|
pt.y = hintmap ? cf2_hintmap_map( hintmap, y )
|
||||||
: FT_MulFix( glyphpath->scaleY, y );
|
: FT_MulFix( y, glyphpath->scaleY );
|
||||||
|
|
||||||
|
|
||||||
ppt->x = ADD_INT32(
|
ppt->x = ADD_INT32(
|
||||||
FT_MulFix( glyphpath->font->outerTransform.a, pt.x ),
|
FT_MulFix( pt.x, glyphpath->font->outerTransform.a ),
|
||||||
ADD_INT32(
|
ADD_INT32(
|
||||||
FT_MulFix( glyphpath->font->outerTransform.c, pt.y ),
|
FT_MulFix( pt.y, glyphpath->font->outerTransform.c ),
|
||||||
glyphpath->fractionalTranslation.x ) );
|
glyphpath->fractionalTranslation.x ) );
|
||||||
ppt->y = ADD_INT32(
|
ppt->y = ADD_INT32(
|
||||||
FT_MulFix( glyphpath->font->outerTransform.b, pt.x ),
|
FT_MulFix( pt.x, glyphpath->font->outerTransform.b ),
|
||||||
ADD_INT32(
|
ADD_INT32(
|
||||||
FT_MulFix( glyphpath->font->outerTransform.d, pt.y ),
|
FT_MulFix( pt.y, glyphpath->font->outerTransform.d ),
|
||||||
glyphpath->fractionalTranslation.y ) );
|
glyphpath->fractionalTranslation.y ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1580,10 +1580,10 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* +x +y */
|
/* +x +y */
|
||||||
*x = FT_MulFix( cf2_doubleToFixed( 0.7 ),
|
*x = FT_MulFix( glyphpath->xOffset,
|
||||||
glyphpath->xOffset );
|
cf2_doubleToFixed( 0.7 ) );
|
||||||
*y = FT_MulFix( cf2_doubleToFixed( 1.0 - 0.7 ),
|
*y = FT_MulFix( glyphpath->yOffset,
|
||||||
glyphpath->yOffset );
|
cf2_doubleToFixed( 1.0 - 0.7 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1605,10 +1605,10 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* +x -y */
|
/* +x -y */
|
||||||
*x = FT_MulFix( cf2_doubleToFixed( -0.7 ),
|
*x = FT_MulFix( glyphpath->xOffset,
|
||||||
glyphpath->xOffset );
|
cf2_doubleToFixed( -0.7 ) );
|
||||||
*y = FT_MulFix( cf2_doubleToFixed( 1.0 - 0.7 ),
|
*y = FT_MulFix( glyphpath->yOffset,
|
||||||
glyphpath->yOffset );
|
cf2_doubleToFixed( 1.0 - 0.7 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1633,10 +1633,10 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* -x +y */
|
/* -x +y */
|
||||||
*x = FT_MulFix( cf2_doubleToFixed( 0.7 ),
|
*x = FT_MulFix( glyphpath->xOffset,
|
||||||
glyphpath->xOffset );
|
cf2_doubleToFixed( 0.7 ) );
|
||||||
*y = FT_MulFix( cf2_doubleToFixed( 1.0 + 0.7 ),
|
*y = FT_MulFix( glyphpath->yOffset,
|
||||||
glyphpath->yOffset );
|
cf2_doubleToFixed( 1.0 + 0.7 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1658,10 +1658,10 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* -x -y */
|
/* -x -y */
|
||||||
*x = FT_MulFix( cf2_doubleToFixed( -0.7 ),
|
*x = FT_MulFix( glyphpath->xOffset,
|
||||||
glyphpath->xOffset );
|
cf2_doubleToFixed( -0.7 ) );
|
||||||
*y = FT_MulFix( cf2_doubleToFixed( 1.0 + 0.7 ),
|
*y = FT_MulFix( glyphpath->yOffset,
|
||||||
glyphpath->yOffset );
|
cf2_doubleToFixed( 1.0 + 0.7 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue