From 94a365e94b2c0aa8f83f5c3b059be55d1add51f3 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 18 Mar 2022 14:50:57 +0200 Subject: HarfBuzz: Update to version 4.0.1 --- thirdparty/harfbuzz/src/hb-repacker.hh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'thirdparty/harfbuzz/src/hb-repacker.hh') diff --git a/thirdparty/harfbuzz/src/hb-repacker.hh b/thirdparty/harfbuzz/src/hb-repacker.hh index b1726d8beb..2a9e75c45b 100644 --- a/thirdparty/harfbuzz/src/hb-repacker.hh +++ b/thirdparty/harfbuzz/src/hb-repacker.hh @@ -37,7 +37,6 @@ * For a detailed writeup on the overflow resolution algorithm see: * docs/repacker.md */ - struct graph_t { struct vertex_t @@ -140,7 +139,8 @@ struct graph_t * the 'packed' object stack used internally in the * serializer */ - graph_t (const hb_vector_t& objects) + template + graph_t (const T& objects) : parents_invalid (true), distance_invalid (true), positions_invalid (true), @@ -1098,8 +1098,9 @@ struct graph_t hb_vector_t num_roots_for_space_; }; -static bool _try_isolating_subgraphs (const hb_vector_t& overflows, - graph_t& sorted_graph) +static inline +bool _try_isolating_subgraphs (const hb_vector_t& overflows, + graph_t& sorted_graph) { unsigned space = 0; hb_set_t roots_to_isolate; @@ -1147,9 +1148,10 @@ static bool _try_isolating_subgraphs (const hb_vector_t& overflows, - hb_set_t& priority_bumped_parents, - graph_t& sorted_graph) +static inline +bool _process_overflows (const hb_vector_t& overflows, + hb_set_t& priority_bumped_parents, + graph_t& sorted_graph) { bool resolution_attempted = false; @@ -1207,8 +1209,9 @@ static bool _process_overflows (const hb_vector_t& o * For a detailed writeup describing how the algorithm operates see: * docs/repacker.md */ +template inline hb_blob_t* -hb_resolve_overflows (const hb_vector_t& packed, +hb_resolve_overflows (const T& packed, hb_tag_t table_tag, unsigned max_rounds = 20) { // Kahn sort is ~twice as fast as shortest distance sort and works for many fonts -- cgit v1.2.3