mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
[subset-perf] Speed up Coverage::serialize by caching iterator.
This commit is contained in:
1 parent
14b18725f0
commit
482c6e5dc4
1 file changed
+5
-2
@@ -1725,9 +1725,12 @@ struct Coverage
|
||||
| hb_filter (glyphset)
|
||||
| hb_map_retains_sorting (glyph_map)
|
||||
;
|
||||
// Cache the iterator result as it will be iterated multiple times
|
||||
// by the serialize code below.
|
||||
hb_sorted_vector_t<hb_codepoint_t> glyphs (it);
|
||||
|
||||
bool ret = bool (it);
|
||||
Coverage_serialize (c->serializer, it);
|
||||
bool ret = bool (glyphs);
|
||||
Coverage_serialize (c->serializer, glyphs.iter ());
|
||||
return_trace (ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user