[aat] Remove the buffer-digest threshold

This can help us skip entire subchains, eg. when they are for
different scripts.

Speeds up LucidaGrande with ASCII text by 20%.
This commit is contained in:
Behdad Esfahbod 2025-02-04 17:33:42 +00:00
parent e1cb3b155a
commit 3a1d7ee7e8
3 changed files with 2 additions and 10 deletions

View file

@ -40,8 +40,6 @@ namespace AAT {
using namespace OT;
#define HB_AAT_BUFFER_DIGEST_THRESHOLD 32
struct ankr;
using hb_aat_class_cache_t = hb_cache_t<15, 8, 7>;

View file

@ -967,10 +967,7 @@ 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 ();
c->buffer_digest = c->buffer->digest ();
typedef typename T::SubTable SubTable;

View file

@ -1404,10 +1404,7 @@ 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->buffer_digest = c->buffer->digest ();
c->set_lookup_index (0);
const Chain<Types> *chain = &firstChain;