From b37e8bef0ec1401710e10bf83ac83da7449e3178 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 5 Aug 2022 22:16:20 +0000 Subject: [PATCH] [repacker] count size of the current class at the split point in the next segment. --- src/graph/pairpos-graph.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/graph/pairpos-graph.hh b/src/graph/pairpos-graph.hh index 0c5a096b1..ad691195b 100644 --- a/src/graph/pairpos-graph.hh +++ b/src/graph/pairpos-graph.hh @@ -240,7 +240,7 @@ struct PairPosFormat2 : public OT::Layout::GPOS_impl::PairPosFormat2_4 (1 << 16)) { split_points.push (i); - accumulated = base_size; - coverage_size = 4; - class_def_1_size = 4; + // split does not include i, so add the size for i when we reset the size counters. + accumulated = base_size + accumulated_delta; + coverage_size = 4 + estimator.incremental_coverage_size (i); + class_def_1_size = 4 + estimator.incremental_class_def_size (i); visited.clear (); // node sharing isn't allowed between splits. } }