summaryrefslogtreecommitdiff
path: root/config_host/config_vendor.h.in
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-04-08 21:17:58 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-04-14 08:34:20 +0200
commit6c8dffc19e2a570d5665344dcba6afedd3dc2e15 (patch)
treec4633bb54eb7d196cef9460958cd32a159bec2aa /config_host/config_vendor.h.in
parent63abdec59d2fc23c988cb7c160bd4625e7e464a9 (diff)
compute subset of glyphs in SalLayoutGlyphsCache (tdf#139604)
When OutputDevice::ImplLayout() computes glyphs, the result is always the same for the same string (and font etc.), and if the function is asked to work on just a subset of the string, the returned glyphs are often also a subset of glyphs for the full string. Since e.g. EditEngine breaks text into lines by first laying out a full string and then repeatedly calls the same function for a subset of the string with increasing starting index. So if the full result is cached, it's faster to just make a subset of that, adjust it as necessary and return that, instead of doing a layout again. This requires support from harfbuzz to tell us if it's safe to break at a given position, and HB_GLYPH_FLAG_UNSAFE_TO_BREAK is that (https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-flags-t). I'm keeping the optimization for tdf#144515, as avoiding the extra layout altogether is still useful. Change-Id: I33f70f9af89be79056e464908eac0861f58d274a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132753 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'config_host/config_vendor.h.in')
0 files changed, 0 insertions, 0 deletions