mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 08:48:02 +02:00
[gxvar] Inline two USHORT reads.
Speeds up GoogleSansFlex variable glyph drawing by ~13%. Before: 2.95ms After: 2.57ms * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Do it.
This commit is contained in:
parent
0a574d50e8
commit
14399c73c4
1 changed files with 10 additions and 2 deletions
|
|
@ -4157,8 +4157,16 @@
|
|||
|
||||
FT_TRACE6(( " tuple %d:\n", i ));
|
||||
|
||||
tupleDataSize = FT_GET_USHORT();
|
||||
tupleIndex = FT_GET_USHORT();
|
||||
/* Enter frame for four bytes. */
|
||||
if ( stream->limit - stream->cursor < 4 )
|
||||
{
|
||||
FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:"
|
||||
" invalid glyph variation array header\n" ));
|
||||
error = FT_THROW( Invalid_Table );
|
||||
goto Exit;
|
||||
}
|
||||
tupleDataSize = FT_NEXT_USHORT( stream->cursor );
|
||||
tupleIndex = FT_NEXT_USHORT( stream->cursor );
|
||||
|
||||
if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue