[layout] Optimize buffer message calls
Those aren't exactly free. They were showing up in profiles.
This commit is contained in:
parent
49d75ef331
commit
da7b66c1f8
|
@ -1959,7 +1959,8 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
|
||||||
auto &lookup = lookups[table_index][i];
|
auto &lookup = lookups[table_index][i];
|
||||||
|
|
||||||
unsigned int lookup_index = lookup.index;
|
unsigned int lookup_index = lookup.index;
|
||||||
if (!buffer->message (font, "start lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag))) continue;
|
if (buffer->messaging () &&
|
||||||
|
!buffer->message (font, "start lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag))) continue;
|
||||||
|
|
||||||
/* c.digest is a digest of all the current glyphs in the buffer
|
/* c.digest is a digest of all the current glyphs in the buffer
|
||||||
* (plus some past glyphs).
|
* (plus some past glyphs).
|
||||||
|
@ -1978,9 +1979,10 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
|
||||||
proxy.table.get_lookup (lookup_index),
|
proxy.table.get_lookup (lookup_index),
|
||||||
proxy.accels[lookup_index]);
|
proxy.accels[lookup_index]);
|
||||||
}
|
}
|
||||||
else
|
else if (buffer->messaging ())
|
||||||
(void) buffer->message (font, "skipped lookup %u feature '%c%c%c%c' because no glyph matches", lookup_index, HB_UNTAG (lookup.feature_tag));
|
(void) buffer->message (font, "skipped lookup %u feature '%c%c%c%c' because no glyph matches", lookup_index, HB_UNTAG (lookup.feature_tag));
|
||||||
|
|
||||||
|
if (buffer->messaging ())
|
||||||
(void) buffer->message (font, "end lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag));
|
(void) buffer->message (font, "end lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue