[raster] Eliminate intensive flow checking.
* src/raster/ftraster.c (Draw_Sweep): Pass the flow increment. (Increment): Accept the flow increment.
This commit is contained in:
parent
63d3a37eb7
commit
efbae5476f
|
@ -1913,7 +1913,8 @@
|
||||||
* Bubble sort with immediate restart is good enough and simple.
|
* Bubble sort with immediate restart is good enough and simple.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
Increment( PProfileList list )
|
Increment( PProfileList list,
|
||||||
|
Int flow )
|
||||||
{
|
{
|
||||||
PProfile *old, current, next;
|
PProfile *old, current, next;
|
||||||
|
|
||||||
|
@ -1925,7 +1926,7 @@
|
||||||
current = *old;
|
current = *old;
|
||||||
if ( --current->height )
|
if ( --current->height )
|
||||||
{
|
{
|
||||||
current->offset += ( current->flags & Flow_Up ) ? 1 : -1;
|
current->offset += flow;
|
||||||
current->X = current->x[current->offset];
|
current->X = current->x[current->offset];
|
||||||
old = ¤t->link;
|
old = ¤t->link;
|
||||||
}
|
}
|
||||||
|
@ -2267,6 +2268,8 @@
|
||||||
{
|
{
|
||||||
*Q = P->link; /* remove */
|
*Q = P->link; /* remove */
|
||||||
|
|
||||||
|
/* each active list contains profiles with the same flow */
|
||||||
|
/* left and right are arbitrary, correspond to TrueType */
|
||||||
if ( P->flags & Flow_Up )
|
if ( P->flags & Flow_Up )
|
||||||
InsNew( &draw_left, P );
|
InsNew( &draw_left, P );
|
||||||
else
|
else
|
||||||
|
@ -2294,6 +2297,8 @@
|
||||||
Long xs;
|
Long xs;
|
||||||
|
|
||||||
|
|
||||||
|
/* TrueType should have x2 > x1, but can be opposite */
|
||||||
|
/* by mistake or in CFF/Type1, fix it then */
|
||||||
if ( x1 > x2 )
|
if ( x1 > x2 )
|
||||||
{
|
{
|
||||||
xs = x1;
|
xs = x1;
|
||||||
|
@ -2418,8 +2423,8 @@
|
||||||
|
|
||||||
ras.Proc_Sweep_Step( RAS_VAR );
|
ras.Proc_Sweep_Step( RAS_VAR );
|
||||||
|
|
||||||
Increment( &draw_left );
|
Increment( &draw_left, 1 );
|
||||||
Increment( &draw_right );
|
Increment( &draw_right, -1 );
|
||||||
}
|
}
|
||||||
while ( ++y < y_turn );
|
while ( ++y < y_turn );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue