[gsubgpos] Use accelerator when recursing
This commit is contained in:
parent
e377888990
commit
950c7ab3f0
|
@ -56,12 +56,20 @@ PosLookup::dispatch_recurse_func<hb_closure_lookups_context_t> (hb_closure_looku
|
|||
template <>
|
||||
inline bool PosLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply_context_t *c, unsigned int lookup_index)
|
||||
{
|
||||
const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
|
||||
auto *gpos = c->face->table.GPOS.get_relaxed ();
|
||||
const PosLookup &l = gpos->table->get_lookup (lookup_index);
|
||||
unsigned int saved_lookup_props = c->lookup_props;
|
||||
unsigned int saved_lookup_index = c->lookup_index;
|
||||
c->set_lookup_index (lookup_index);
|
||||
c->set_lookup_props (l.get_props ());
|
||||
bool ret = l.dispatch (c);
|
||||
|
||||
bool ret = false;
|
||||
if (lookup_index < gpos->lookup_count)
|
||||
{
|
||||
auto &accel = gpos->accels[lookup_index];
|
||||
ret = accel.apply (c, false);
|
||||
}
|
||||
|
||||
c->set_lookup_index (saved_lookup_index);
|
||||
c->set_lookup_props (saved_lookup_props);
|
||||
return ret;
|
||||
|
|
|
@ -69,12 +69,20 @@ SubstLookup::dispatch_recurse_func<hb_closure_lookups_context_t> (hb_closure_loo
|
|||
template <>
|
||||
inline bool SubstLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply_context_t *c, unsigned int lookup_index)
|
||||
{
|
||||
const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
|
||||
auto *gsub = c->face->table.GSUB.get_relaxed ();
|
||||
const SubstLookup &l = gsub->table->get_lookup (lookup_index);
|
||||
unsigned int saved_lookup_props = c->lookup_props;
|
||||
unsigned int saved_lookup_index = c->lookup_index;
|
||||
c->set_lookup_index (lookup_index);
|
||||
c->set_lookup_props (l.get_props ());
|
||||
bool ret = l.dispatch (c);
|
||||
|
||||
bool ret = false;
|
||||
if (lookup_index < gsub->lookup_count)
|
||||
{
|
||||
auto &accel = gsub->accels[lookup_index];
|
||||
ret = accel.apply (c, false);
|
||||
}
|
||||
|
||||
c->set_lookup_index (saved_lookup_index);
|
||||
c->set_lookup_props (saved_lookup_props);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue