[smooth] Streamline pixmap drawing a bit more.
Zero coverage is unlikely (1 out of 256) to warrant checking. This gives 0.5% speed improvement in dendering simple glyphs. * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
This commit is contained in:
parent
e73055c791
commit
f44ddfda45
|
@ -1,3 +1,12 @@
|
|||
2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[smooth] Streamline pixmap drawing a bit more.
|
||||
|
||||
Zero coverage is unlikely (1 out of 256) to warrant checking. This
|
||||
gives 0.5% speed improvement in dendering simple glyphs.
|
||||
|
||||
* src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
|
||||
|
||||
2016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[smooth] Streamline pixmap drawing.
|
||||
|
|
|
@ -1282,10 +1282,6 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
for ( ; count > 0; count--, spans++ )
|
||||
{
|
||||
unsigned char coverage = spans->coverage;
|
||||
|
||||
|
||||
if ( coverage )
|
||||
{
|
||||
unsigned char* q = p + spans->x;
|
||||
|
||||
|
||||
|
@ -1308,7 +1304,6 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
|
@ -1318,6 +1313,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
TCoord acount )
|
||||
{
|
||||
int coverage;
|
||||
FT_Span span;
|
||||
|
||||
|
||||
/* compute the coverage line's coverage, depending on the */
|
||||
|
@ -1346,18 +1342,12 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
coverage = 255;
|
||||
}
|
||||
|
||||
if ( coverage )
|
||||
{
|
||||
FT_Span span;
|
||||
|
||||
|
||||
span.x = (short)( x + ras.min_ex );
|
||||
span.len = (unsigned short)acount;
|
||||
span.coverage = (unsigned char)coverage;
|
||||
|
||||
ras.render_span( y + ras.min_ey, 1, &span, ras.render_span_data );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue