提交 b5371f18 编写于 作者: B Behdad Esfahbod

Inline decompose_cluster

Towards separating the common case into its own loop.
上级 b314c4e9
......@@ -264,15 +264,6 @@ decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned
decompose_current_character (c, short_circuit);
}
static inline void
decompose_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end, bool might_short_circuit, bool always_short_circuit)
{
if (likely (c->buffer->idx + 1 == end))
decompose_current_character (c, might_short_circuit);
else
decompose_multi_char_cluster (c, end, always_short_circuit);
}
static int
compare_combining_class (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
......@@ -337,7 +328,10 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
if (likely (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[end]))))
break;
decompose_cluster (&c, end, might_short_circuit, always_short_circuit);
if (likely (c.buffer->idx + 1 == end))
decompose_current_character (&c, might_short_circuit);
else
decompose_multi_char_cluster (&c, end, always_short_circuit);
}
buffer->swap_buffers ();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册