Merge pull request #2686 from simoncozens/more-tracing

More tracing
This commit is contained in:
Khaled Hosny 2020-11-17 14:32:04 +02:00 committed by GitHub
commit c4ade4fdd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 17 deletions

View File

@ -1881,7 +1881,7 @@ void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, h
GSUBProxy proxy (font->face); GSUBProxy proxy (font->face);
if (!buffer->message (font, "start table GSUB")) return; if (!buffer->message (font, "start table GSUB")) return;
apply (proxy, plan, font, buffer); apply (proxy, plan, font, buffer);
(void)buffer->message (font, "end table GSUB"); (void) buffer->message (font, "end table GSUB");
} }
void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const
@ -1889,7 +1889,7 @@ void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_
GPOSProxy proxy (font->face); GPOSProxy proxy (font->face);
if (!buffer->message (font, "start table GPOS")) return; if (!buffer->message (font, "start table GPOS")) return;
apply (proxy, plan, font, buffer); apply (proxy, plan, font, buffer);
(void)buffer->message (font, "end table GPOS"); (void) buffer->message (font, "end table GPOS");
} }
void void

View File

@ -1006,11 +1006,14 @@ initial_reordering_indic (const hb_ot_shape_plan_t *plan,
hb_font_t *font, hb_font_t *font,
hb_buffer_t *buffer) hb_buffer_t *buffer)
{ {
if (!buffer->message (font, "start reordering indic initial"))
return;
update_consonant_positions_indic (plan, font, buffer); update_consonant_positions_indic (plan, font, buffer);
insert_dotted_circles_indic (plan, font, buffer); insert_dotted_circles_indic (plan, font, buffer);
foreach_syllable (buffer, start, end) foreach_syllable (buffer, start, end)
initial_reordering_syllable_indic (plan, font->face, buffer, start, end); initial_reordering_syllable_indic (plan, font->face, buffer, start, end);
(void) buffer->message (font, "end reordering indic initial");
} }
static void static void
@ -1485,8 +1488,11 @@ final_reordering_indic (const hb_ot_shape_plan_t *plan,
unsigned int count = buffer->len; unsigned int count = buffer->len;
if (unlikely (!count)) return; if (unlikely (!count)) return;
foreach_syllable (buffer, start, end) if (buffer->message (font, "start reordering indic final")) {
final_reordering_syllable_indic (plan, buffer, start, end); foreach_syllable (buffer, start, end)
final_reordering_syllable_indic (plan, buffer, start, end);
(void) buffer->message (font, "end reordering indic final");
}
HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category); HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category);
HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position); HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position);

View File

@ -389,11 +389,13 @@ reorder_khmer (const hb_ot_shape_plan_t *plan,
hb_font_t *font, hb_font_t *font,
hb_buffer_t *buffer) hb_buffer_t *buffer)
{ {
insert_dotted_circles_khmer (plan, font, buffer); if (buffer->message (font, "start reordering khmer")) {
insert_dotted_circles_khmer (plan, font, buffer);
foreach_syllable (buffer, start, end)
reorder_syllable_khmer (plan, font->face, buffer, start, end);
foreach_syllable (buffer, start, end)
reorder_syllable_khmer (plan, font->face, buffer, start, end);
(void) buffer->message (font, "end reordering khmer");
}
HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_category); HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_category);
} }

View File

@ -327,10 +327,13 @@ reorder_myanmar (const hb_ot_shape_plan_t *plan,
hb_font_t *font, hb_font_t *font,
hb_buffer_t *buffer) hb_buffer_t *buffer)
{ {
insert_dotted_circles_myanmar (plan, font, buffer); if (buffer->message (font, "start reordering myanmar")) {
insert_dotted_circles_myanmar (plan, font, buffer);
foreach_syllable (buffer, start, end) foreach_syllable (buffer, start, end)
reorder_syllable_myanmar (plan, font->face, buffer, start, end); reorder_syllable_myanmar (plan, font->face, buffer, start, end);
(void) buffer->message (font, "end reordering myanmar");
}
HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_category); HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_category);
HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_position); HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_position);

View File

@ -517,10 +517,14 @@ reorder_use (const hb_ot_shape_plan_t *plan,
hb_font_t *font, hb_font_t *font,
hb_buffer_t *buffer) hb_buffer_t *buffer)
{ {
insert_dotted_circles_use (plan, font, buffer); if (buffer->message (font, "start reordering USE")) {
insert_dotted_circles_use (plan, font, buffer);
foreach_syllable (buffer, start, end) foreach_syllable (buffer, start, end)
reorder_syllable_use (buffer, start, end); reorder_syllable_use (buffer, start, end);
(void) buffer->message (font, "end reordering USE");
}
HB_BUFFER_DEALLOCATE_VAR (buffer, use_category); HB_BUFFER_DEALLOCATE_VAR (buffer, use_category);
} }

View File

@ -373,7 +373,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
/* Second round, reorder (inplace) */ /* Second round, reorder (inplace) */
if (!all_simple) if (!all_simple && buffer->message(font, "start reorder"))
{ {
count = buffer->len; count = buffer->len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
@ -399,6 +399,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
i = end; i = end;
} }
(void) buffer->message(font, "end reorder");
} }
if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_CGJ) if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_CGJ)
{ {

View File

@ -896,8 +896,11 @@ hb_ot_substitute_post (const hb_ot_shape_context_t *c)
hb_aat_layout_remove_deleted_glyphs (c->buffer); hb_aat_layout_remove_deleted_glyphs (c->buffer);
#endif #endif
if (c->plan->shaper->postprocess_glyphs) if (c->plan->shaper->postprocess_glyphs &&
c->buffer->message(c->font, "start postprocess-glyphs")) {
c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font); c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font);
(void) c->buffer->message(c->font, "end postprocess-glyphs");
}
} }
@ -1120,8 +1123,11 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c)
hb_ensure_native_direction (c->buffer); hb_ensure_native_direction (c->buffer);
if (c->plan->shaper->preprocess_text) if (c->plan->shaper->preprocess_text &&
c->buffer->message(c->font, "start preprocess-text")) {
c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font); c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font);
(void) c->buffer->message(c->font, "end preprocess-text");
}
hb_ot_substitute_pre (c); hb_ot_substitute_pre (c);
hb_ot_position (c); hb_ot_position (c);