From 4730b350b7ee90338caf3e962343af42412ce3df Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 12 Jul 2019 15:38:35 -0700 Subject: [PATCH] Revert "Update Graphite API to latest (#1215)" This reverts commit e4e74c2751ac24178086cce2811d34d8019b6f85. See https://github.com/harfbuzz/harfbuzz/issues/1829 --- src/hb-graphite2.cc | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index 9588fa4d6..40ac9061f 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -106,32 +106,6 @@ retry: return d; } -static void hb_graphite2_release_table(const void *data, const void *table_buffer) -{ - hb_graphite2_face_data_t *face_data = (hb_graphite2_face_data_t *) data; - hb_graphite2_tablelist_t *tlist = face_data->tlist; - - hb_graphite2_tablelist_t *prev = nullptr; - hb_graphite2_tablelist_t *curr = tlist; - while (curr) - { - if (hb_blob_get_data(curr->blob, nullptr) == table_buffer) - { - if (prev == nullptr) - face_data->tlist.cmpexch(tlist, curr->next); - else - prev->next = curr->next; - hb_blob_destroy(curr->blob); - free(curr); - break; - } - prev = curr; - curr = curr->next; - } -} - -static gr_face_ops hb_graphite2_face_ops = { sizeof(gr_face_ops), hb_graphite2_get_table, hb_graphite2_release_table }; - hb_graphite2_face_data_t * _hb_graphite2_shaper_face_data_create (hb_face_t *face) { @@ -150,7 +124,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face) return nullptr; data->face = face; - data->grface = gr_make_face_with_ops (data, &hb_graphite2_face_ops, gr_face_preloadAll); + data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll); if (unlikely (!data->grface)) { free (data);