diff --git a/src/hb-debug.hh b/src/hb-debug.hh index eaf444146..d7d0165a9 100644 --- a/src/hb-debug.hh +++ b/src/hb-debug.hh @@ -401,18 +401,6 @@ struct hb_no_trace_t { #define TRACE_APPLY(this) hb_no_trace_t trace #endif -#ifndef HB_DEBUG_COLLECT_GLYPHS -#define HB_DEBUG_COLLECT_GLYPHS (HB_DEBUG+0) -#endif -#if HB_DEBUG_COLLECT_GLYPHS -#define TRACE_COLLECT_GLYPHS(this) \ - hb_auto_trace_t trace \ - (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - " ") -#else -#define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t trace HB_UNUSED -#endif - #ifndef HB_DEBUG_SANITIZE #define HB_DEBUG_SANITIZE (HB_DEBUG+0) #endif @@ -464,7 +452,6 @@ struct hb_no_trace_t { #ifndef HB_DEBUG_DISPATCH #define HB_DEBUG_DISPATCH ( \ HB_DEBUG_APPLY + \ - HB_DEBUG_COLLECT_GLYPHS + \ HB_DEBUG_SANITIZE + \ HB_DEBUG_SERIALIZE + \ HB_DEBUG_SUBSET + \ diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 4d0abad33..0b7b11088 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -472,10 +472,7 @@ struct SinglePosFormat1 { return (this+coverage).intersects (glyphs); } void collect_glyphs (hb_collect_glyphs_context_t *c) const - { - TRACE_COLLECT_GLYPHS (this); - if (unlikely (!(this+coverage).add_coverage (c->input))) return; - } + { if (unlikely (!(this+coverage).add_coverage (c->input))) return; } const Coverage &get_coverage () const { return this+coverage; } @@ -527,10 +524,7 @@ struct SinglePosFormat2 { return (this+coverage).intersects (glyphs); } void collect_glyphs (hb_collect_glyphs_context_t *c) const - { - TRACE_COLLECT_GLYPHS (this); - if (unlikely (!(this+coverage).add_coverage (c->input))) return; - } + { if (unlikely (!(this+coverage).add_coverage (c->input))) return; } const Coverage &get_coverage () const { return this+coverage; } @@ -642,7 +636,6 @@ struct PairSet void collect_glyphs (hb_collect_glyphs_context_t *c, const ValueFormat *valueFormats) const { - TRACE_COLLECT_GLYPHS (this); unsigned int len1 = valueFormats[0].get_len (); unsigned int len2 = valueFormats[1].get_len (); unsigned int record_size = HBUINT16::static_size * (1 + len1 + len2); @@ -743,7 +736,6 @@ struct PairPosFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; unsigned int count = pairSet.len; for (unsigned int i = 0; i < count; i++) @@ -820,7 +812,6 @@ struct PairPosFormat2 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; if (unlikely (!(this+classDef2).add_coverage (c->input))) return; } @@ -971,10 +962,7 @@ struct CursivePosFormat1 { return (this+coverage).intersects (glyphs); } void collect_glyphs (hb_collect_glyphs_context_t *c) const - { - TRACE_COLLECT_GLYPHS (this); - if (unlikely (!(this+coverage).add_coverage (c->input))) return; - } + { if (unlikely (!(this+coverage).add_coverage (c->input))) return; } const Coverage &get_coverage () const { return this+coverage; } @@ -1138,7 +1126,6 @@ struct MarkBasePosFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+markCoverage).add_coverage (c->input))) return; if (unlikely (!(this+baseCoverage).add_coverage (c->input))) return; } @@ -1260,7 +1247,6 @@ struct MarkLigPosFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+markCoverage).add_coverage (c->input))) return; if (unlikely (!(this+ligatureCoverage).add_coverage (c->input))) return; } @@ -1381,7 +1367,6 @@ struct MarkMarkPosFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+mark1Coverage).add_coverage (c->input))) return; if (unlikely (!(this+mark2Coverage).add_coverage (c->input))) return; } @@ -1584,10 +1569,7 @@ struct PosLookup : Lookup } hb_collect_glyphs_context_t::return_t collect_glyphs (hb_collect_glyphs_context_t *c) const - { - TRACE_COLLECT_GLYPHS (this); - return_trace (dispatch (c)); - } + { return dispatch (c); } template void add_coverage (set_t *glyphs) const diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 710ea01cb..39b7cf225 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -58,7 +58,6 @@ struct SingleSubstFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; for (Coverage::Iter iter (this+coverage); iter.more (); iter.next ()) { @@ -158,7 +157,6 @@ struct SingleSubstFormat2 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; unsigned int count = substitute.len; for (Coverage::Iter iter (this+coverage); iter.more (); iter.next ()) @@ -302,10 +300,7 @@ struct Sequence } void collect_glyphs (hb_collect_glyphs_context_t *c) const - { - TRACE_COLLECT_GLYPHS (this); - c->output->add_array (substitute.arrayZ, substitute.len); - } + { c->output->add_array (substitute.arrayZ, substitute.len); } bool apply (hb_ot_apply_context_t *c) const { @@ -378,7 +373,6 @@ struct MultipleSubstFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; unsigned int count = sequence.len; for (unsigned int i = 0; i < count; i++) @@ -492,10 +486,7 @@ struct AlternateSet } void collect_glyphs (hb_collect_glyphs_context_t *c) const - { - TRACE_COLLECT_GLYPHS (this); - c->output->add_array (alternates.arrayZ, alternates.len); - } + { c->output->add_array (alternates.arrayZ, alternates.len); } bool apply (hb_ot_apply_context_t *c) const { @@ -562,7 +553,6 @@ struct AlternateSubstFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; unsigned int count = alternateSet.len; for (Coverage::Iter iter (this+coverage); iter.more (); iter.next ()) @@ -693,7 +683,6 @@ struct Ligature void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); c->input->add_array (component.arrayZ, component.lenP1 ? component.lenP1 - 1 : 0); c->output->add (ligGlyph); } @@ -798,7 +787,6 @@ struct LigatureSet void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); unsigned int num_ligs = ligature.len; for (unsigned int i = 0; i < num_ligs; i++) (this+ligature[i]).collect_glyphs (c); @@ -895,7 +883,6 @@ struct LigatureSubstFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; unsigned int count = ligatureSet.len; for (Coverage::Iter iter (this+coverage); iter.more (); iter.next ()) @@ -1086,7 +1073,6 @@ struct ReverseChainSingleSubstFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); if (unlikely (!(this+coverage).add_coverage (c->input))) return; unsigned int count; @@ -1306,9 +1292,8 @@ struct SubstLookup : Lookup hb_collect_glyphs_context_t::return_t collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); c->set_recurse_func (dispatch_recurse_func); - return_trace (dispatch (c)); + return dispatch (c); } template diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 7c31b28c8..1afa61584 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -151,7 +151,7 @@ struct hb_would_apply_context_t : struct hb_collect_glyphs_context_t : - hb_dispatch_context_t + hb_dispatch_context_t { const char *get_name () { return "COLLECT_GLYPHS"; } typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index); @@ -1307,7 +1307,6 @@ struct Rule void collect_glyphs (hb_collect_glyphs_context_t *c, ContextCollectGlyphsLookupContext &lookup_context) const { - TRACE_COLLECT_GLYPHS (this); const UnsizedArrayOf &lookupRecord = StructAfter > (inputZ.as_array (inputCount ? inputCount - 1 : 0)); context_collect_glyphs_lookup (c, @@ -1383,7 +1382,6 @@ struct RuleSet void collect_glyphs (hb_collect_glyphs_context_t *c, ContextCollectGlyphsLookupContext &lookup_context) const { - TRACE_COLLECT_GLYPHS (this); unsigned int num_rules = rule.len; for (unsigned int i = 0; i < num_rules; i++) (this+rule[i]).collect_glyphs (c, lookup_context); @@ -1470,7 +1468,6 @@ struct ContextFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); (this+coverage).add_coverage (c->input); struct ContextCollectGlyphsLookupContext lookup_context = { @@ -1583,7 +1580,6 @@ struct ContextFormat2 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); (this+coverage).add_coverage (c->input); const ClassDef &class_def = this+classDef; @@ -1692,7 +1688,6 @@ struct ContextFormat3 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); (this+coverageZ[0]).add_coverage (c->input); const LookupRecord *lookupRecord = &StructAfter (coverageZ.as_array (glyphCount)); @@ -1958,7 +1953,6 @@ struct ChainRule void collect_glyphs (hb_collect_glyphs_context_t *c, ChainContextCollectGlyphsLookupContext &lookup_context) const { - TRACE_COLLECT_GLYPHS (this); const HeadlessArrayOf &input = StructAfter > (backtrack); const ArrayOf &lookahead = StructAfter > (input); const ArrayOf &lookup = StructAfter > (lookahead); @@ -2046,7 +2040,6 @@ struct ChainRuleSet void collect_glyphs (hb_collect_glyphs_context_t *c, ChainContextCollectGlyphsLookupContext &lookup_context) const { - TRACE_COLLECT_GLYPHS (this); unsigned int num_rules = rule.len; for (unsigned int i = 0; i < num_rules; i++) (this+rule[i]).collect_glyphs (c, lookup_context); @@ -2128,7 +2121,6 @@ struct ChainContextFormat1 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); (this+coverage).add_coverage (c->input); struct ChainContextCollectGlyphsLookupContext lookup_context = { @@ -2246,7 +2238,6 @@ struct ChainContextFormat2 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); (this+coverage).add_coverage (c->input); const ClassDef &backtrack_class_def = this+backtrackClassDef; @@ -2392,7 +2383,6 @@ struct ChainContextFormat3 void collect_glyphs (hb_collect_glyphs_context_t *c) const { - TRACE_COLLECT_GLYPHS (this); const OffsetArrayOf &input = StructAfter > (backtrack); (this+input[0]).add_coverage (c->input);