inline bool can_use_fast_path (unsigned int lookup_type) const
{
/* Fast path, for those that have coverage in the same place. */
- return likely (lookup_type < Context) ||
+ return likely (lookup_type && lookup_type < Context) ||
(hb_in_range<unsigned int> (lookup_type, Context, ChainContext) &&
hb_in_range<unsigned int> (u.header.sub_format, 1, 2));
}
/* Fast path, for those that have coverage in the same place.
* Note that ReverseChainSingle can also go through this but
* it's not worth the effort. */
- return likely (lookup_type < Context) ||
+ return likely (lookup_type && lookup_type < Context) ||
(hb_in_range<unsigned int> (lookup_type, Context, ChainContext) &&
hb_in_range<unsigned int> (u.header.sub_format, 1, 2));
}
{
output.new_line ();
+ for (unsigned int i = 0; i < 10000; i++) {
shaper.populate_buffer (buffer, text, text_len);
output.consume_text (buffer, text, text_len, shaper.utf8_clusters);
output.shape_failed (buffer, text, text_len, shaper.utf8_clusters);
return;
}
+ }
output.consume_glyphs (buffer, text, text_len, shaper.utf8_clusters);
}