dwrite: Use prefetched glyph class to match with lookup mask.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-05-25 14:54:30 +03:00 committed by Alexandre Julliard
parent b1f215dd78
commit 7f427f258d

View file

@ -3425,21 +3425,21 @@ static void glyph_iterator_init(struct scriptshaping_context *context, unsigned
iter->len = len;
}
static BOOL glyph_iterator_match(const struct glyph_iterator *iter)
static BOOL lookup_is_glyph_match(unsigned int glyph_props, unsigned int lookup_flags)
{
struct scriptshaping_cache *cache = iter->context->cache;
if (glyph_props & lookup_flags & LOOKUP_FLAG_IGNORE_MASK)
return FALSE;
if (cache->gdef.classdef)
{
unsigned int glyph_class = opentype_layout_get_glyph_class(&cache->gdef.table, cache->gdef.classdef,
iter->context->u.pos.glyphs[iter->pos]);
if ((1 << glyph_class) & iter->flags & LOOKUP_FLAG_IGNORE_MASK)
return FALSE;
}
/* FIXME: match mark properties */
return TRUE;
}
static BOOL glyph_iterator_match(const struct glyph_iterator *iter)
{
return lookup_is_glyph_match(iter->context->glyph_infos[iter->pos].props, iter->flags);
}
static BOOL glyph_iterator_next(struct glyph_iterator *iter)
{
while (iter->pos + iter->len < iter->context->glyph_count)