[aat] Optimize feature application
This commit is contained in:
parent
4ee6094114
commit
0e11d317ee
|
@ -786,7 +786,8 @@ struct StateTableDriver
|
||||||
buffer->unsafe_to_concat ();
|
buffer->unsafe_to_concat ();
|
||||||
|
|
||||||
int state = StateTableT::STATE_START_OF_TEXT;
|
int state = StateTableT::STATE_START_OF_TEXT;
|
||||||
auto *last_range = ac->range_flags && (*ac->range_flags) ? &(*ac->range_flags)[0] : nullptr;
|
// If there's only one range, we already checked the flag.
|
||||||
|
auto *last_range = ac->range_flags && (ac->range_flags->length > 1) ? &(*ac->range_flags)[0] : nullptr;
|
||||||
for (buffer->idx = 0; buffer->successful;)
|
for (buffer->idx = 0; buffer->successful;)
|
||||||
{
|
{
|
||||||
if (last_range)
|
if (last_range)
|
||||||
|
|
|
@ -618,7 +618,8 @@ struct NoncontextualSubtable
|
||||||
|
|
||||||
hb_glyph_info_t *info = c->buffer->info;
|
hb_glyph_info_t *info = c->buffer->info;
|
||||||
unsigned int count = c->buffer->len;
|
unsigned int count = c->buffer->len;
|
||||||
auto *last_range = c->range_flags && (*c->range_flags) ? &(*c->range_flags)[0] : nullptr;
|
// If there's only one range, we already checked the flag.
|
||||||
|
auto *last_range = c->range_flags && (c->range_flags->length > 1) ? &(*c->range_flags)[0] : nullptr;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (last_range)
|
if (last_range)
|
||||||
|
|
Loading…
Reference in New Issue