From 7642366593826c0e04ad58df83fa63ec53960486 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 4 Feb 2025 13:19:43 +0000 Subject: [PATCH] [aat] Remove buffer-digest stuff With both morx & kerx sped up now using cache / set, this is not beneficial anymore. Remove it. --- src/hb-aat-layout-common.hh | 1 - src/hb-aat-layout-kerx-table.hh | 5 ----- src/hb-aat-layout-morx-table.hh | 10 ---------- 3 files changed, 16 deletions(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 121c25f18..6f8aae773 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -65,7 +65,6 @@ struct hb_aat_apply_context_t : const ankr *ankr_table; const OT::GDEF *gdef_table; const hb_sorted_vector_t *range_flags = nullptr; - hb_set_digest_t buffer_digest = hb_set_digest_t::full (); const hb_set_t *left_set = nullptr; const hb_set_t *right_set = nullptr; hb_aat_class_cache_t *machine_class_cache = nullptr; diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 72d696212..fe8684cbd 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -967,11 +967,6 @@ struct KerxTable { c->buffer->unsafe_to_concat (); - if (c->buffer->len < HB_AAT_BUFFER_DIGEST_THRESHOLD) - c->buffer_digest = c->buffer->digest (); - else - c->buffer_digest = hb_set_digest_t::full (); - typedef typename T::SubTable SubTable; bool ret = false; diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 689621418..8b337941b 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -268,7 +268,6 @@ struct ContextualSubtable { buffer->unsafe_to_break (mark, hb_min (buffer->idx + 1, buffer->len)); buffer->info[mark].codepoint = *replacement; - c->buffer_digest.add (*replacement); if (has_glyph_classes) _hb_glyph_info_set_glyph_props (&buffer->info[mark], gdef.get_glyph_props (*replacement)); @@ -298,7 +297,6 @@ struct ContextualSubtable if (replacement) { buffer->info[idx].codepoint = *replacement; - c->buffer_digest.add (*replacement); if (has_glyph_classes) _hb_glyph_info_set_glyph_props (&buffer->info[idx], gdef.get_glyph_props (*replacement)); @@ -659,7 +657,6 @@ struct NoncontextualSubtable if (replacement) { info[i].codepoint = *replacement; - c->buffer_digest.add (*replacement); if (has_glyph_classes) _hb_glyph_info_set_glyph_props (&info[i], gdef.get_glyph_props (*replacement)); @@ -794,8 +791,6 @@ struct InsertionSubtable if (unlikely (!buffer->copy_glyph ())) return; /* TODO We ignore KashidaLike setting. */ if (unlikely (!buffer->replace_glyphs (0, count, glyphs))) return; - for (unsigned int i = 0; i < count; i++) - c->buffer_digest.add (glyphs[i]); ret = true; if (buffer->idx < buffer->len && !before) buffer->skip_glyph (); @@ -1372,11 +1367,6 @@ struct mortmorx c->buffer->unsafe_to_concat (); - if (c->buffer->len < HB_AAT_BUFFER_DIGEST_THRESHOLD) - c->buffer_digest = c->buffer->digest (); - else - c->buffer_digest = hb_set_digest_t::full (); - c->set_lookup_index (0); const Chain *chain = &firstChain; unsigned int count = chainCount;