mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 14:01:10 +01:00
[repacker] Move already-isolated overflow roots
Initialize every selected root's incoming-edge count before traversing their combined subgraph. This prevents later root initialization from overwriting counts collected through an earlier root. An overflow root still needs a new packing space when no duplication is needed, so move already-isolated roots instead of treating that case as an unsuccessful resolution attempt. Assisted-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
1 parent
5b104f8afe
commit
22248564c1
2 files changed
+4
-3
No files matched your search
@@ -1008,6 +1008,9 @@ public:
|
||||
if (unlikely (root_idx >= vertices_.length))
|
||||
return Err(OUT_OF_BOUNDS);
|
||||
subgraph.set (root_idx, wide_parents (root_idx, parents));
|
||||
}
|
||||
for (unsigned root_idx : roots)
|
||||
{
|
||||
TRY (find_subgraph (root_idx, subgraph));
|
||||
}
|
||||
TRY (graph_result_t<void>::from (subgraph, ALLOCATION_FAILURE));
|
||||
|
||||
+1
-3
@@ -236,9 +236,7 @@ graph_result_t<bool> _try_isolating_subgraphs (const hb_vector_t<graph::overflow
|
||||
sorted_graph.num_roots_for_space (space),
|
||||
roots_to_isolate.get_population (),
|
||||
sorted_graph.next_space ());
|
||||
|
||||
TRY_ASSIGN (bool isolated, sorted_graph.isolate_subgraph (roots_to_isolate));
|
||||
if (!isolated) return Ok(false);
|
||||
TRY (sorted_graph.isolate_subgraph (roots_to_isolate));
|
||||
TRY (sorted_graph.move_to_new_space (roots_to_isolate));
|
||||
|
||||
return Ok(true);
|
||||
|
||||
Reference in new issue
Block a user