[aat] Remove idempotent check

Not necessary after the recent filtering.

Another 10% speedup with LucidaGrande.
pull/5041/head
Behdad Esfahbod 1 week ago
parent 849b17351e
commit fc825168d0
  1. 8
      src/hb-aat-layout-common.hh
  2. 12
      src/hb-aat-layout-morx-table.hh

@ -1034,14 +1034,6 @@ struct StateTableDriver
machine (machine_),
num_glyphs (face_->get_num_glyphs ()) {}
template <typename context_t>
bool is_idempotent_on_all_out_of_bounds (context_t *c, hb_aat_apply_context_t *ac)
{
const auto entry = machine.get_entry (StateTableT::STATE_START_OF_TEXT, CLASS_OUT_OF_BOUNDS);
return !c->table->is_action_initiable (entry) &&
machine.new_state (entry.newState) == StateTableT::STATE_START_OF_TEXT;
}
template <typename context_t>
void drive (context_t *c, hb_aat_apply_context_t *ac)
{

@ -177,8 +177,7 @@ struct RearrangementSubtable
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
if (driver.is_idempotent_on_all_out_of_bounds (&dc, c) &&
!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
{
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
return_trace (false);
@ -348,8 +347,7 @@ struct ContextualSubtable
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
if (driver.is_idempotent_on_all_out_of_bounds (&dc, c) &&
!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
{
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
return_trace (false);
@ -625,8 +623,7 @@ struct LigatureSubtable
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
if (driver.is_idempotent_on_all_out_of_bounds (&dc, c) &&
!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
{
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
return_trace (false);
@ -920,8 +917,7 @@ struct InsertionSubtable
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
if (driver.is_idempotent_on_all_out_of_bounds (&dc, c) &&
!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
{
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
return_trace (false);

Loading…
Cancel
Save