From 5914acb3cbb3634e9e94e0e571d96b806b7ecacf Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 10 Dec 2021 10:05:47 -0800 Subject: [PATCH] [repacker] Clear distance and position cache when assigning a new space. A change in space will effect the distance assigned to the node and any of it's children so clear the distance cache. --- src/hb-repacker.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh index 8ebae5427..5c46b4ccc 100644 --- a/src/hb-repacker.hh +++ b/src/hb-repacker.hh @@ -742,6 +742,8 @@ struct graph_t num_roots_for_space_[node.space] = num_roots_for_space_[node.space] - 1; num_roots_for_space_[new_space] = num_roots_for_space_[new_space] + 1; node.space = new_space; + distance_invalid = true; + positions_invalid = true; } }