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

Alexandre Julliard julliard at winehq.org
Mon May 25 15:44:23 CDT 2020


Module: wine
Branch: master
Commit: 7f427f258d82d80fb903147dc16fbafe1eda90bc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7f427f258d82d80fb903147dc16fbafe1eda90bc

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon May 25 14:54:30 2020 +0300

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

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 0b9c6067b5..bb62488330 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)




More information about the wine-cvs mailing list