[PATCH 4/5] dwrite: Use prefetched glyph class to match with lookup mask.
Nikolay Sivov
nsivov at codeweavers.com
Mon May 25 06:54:30 CDT 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/dwrite/opentype.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index 0b9c6067b59..bb62488330e 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -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)
--
2.26.2
More information about the wine-devel
mailing list