summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-03-03 15:26:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-03-28 15:34:34 +0000
commit1efe5fe38031f7bc23150c35e4c68940621a1d5b (patch)
tree7b6f08680b1e6810a0f13e756b99eee4d21a4145 /comphelper
parent7fe192da23f4fac73b6ef7393bd8499a373170f3 (diff)
tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfo
When a SwTxtFormatInfo is created to format a paragraph, pre-compute the result of vcl::ScriptRun::next() and cache it for future calls to OutputDevice::GetTextBreak() and GetTextWidth(). This requires adapting a bunch of methods to pass the additional parameter, and some classes to backup and restore the cache when they replace the text of the SwTxtFormatInfo. There is some code in vcl OutputDevice::ImplPrepareLayoutArgs() to modify the passed string and replace digits depending on "meTextLanguage" member; try to set it to the correct value when creating the layout cache (unfortunately it's not possible if the user sets the CTL Numerals config to the non-default "Context" value). Another issue is the check in OutputDevice::ImplLayout() if there is a mpConversion member on the font; apparently this is used to translate between different Symbol fonts, so not very important; just ignore the cache in this case. This reduces vcl::ScriptRun::next() from 11 to 0.36 billion callgrind cycles when built with GCC 4.9.2 -m32 -Os (which is still 16% of the formatting). Change-Id: I61fb8530333f2e7a9199f767c00cf2181ba49951 Reviewed-on: https://gerrit.libreoffice.org/14732 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'comphelper')
0 files changed, 0 insertions, 0 deletions