• Michael Stahl's avatar
    tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfo · b9782a2b
    Michael Stahl yazdı
    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/14732Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
    Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
    b9782a2b
Adı
Son kayıt (commit)
Son güncelleme
..
android Loading commit data...
generic Loading commit data...
headless Loading commit data...
inc Loading commit data...
ios Loading commit data...
null Loading commit data...
opengl Loading commit data...
osx Loading commit data...
qa Loading commit data...
quartz Loading commit data...
source Loading commit data...
test Loading commit data...
uiconfig/ui Loading commit data...
unx Loading commit data...
win/source Loading commit data...
workben Loading commit data...
AllLangResTarget_vcl.mk Loading commit data...
CppunitTest_vcl_app_test.mk Loading commit data...
CppunitTest_vcl_bitmap_test.mk Loading commit data...
CppunitTest_vcl_complextext.mk Loading commit data...
CppunitTest_vcl_filters_test.mk Loading commit data...
CppunitTest_vcl_fontcharmap.mk Loading commit data...
CppunitTest_vcl_outdev.mk Loading commit data...
CppunitTest_vcl_timer.mk Loading commit data...
CppunitTest_vcl_wmf_test.mk Loading commit data...
CustomTarget_afm_hash.mk Loading commit data...
CustomTarget_kde4_moc.mk Loading commit data...
CustomTarget_kde_moc.mk Loading commit data...
CustomTarget_tde_moc.mk Loading commit data...
Executable_icontest.mk Loading commit data...
Executable_kdefilepicker.mk Loading commit data...
Executable_mtfdemo.mk Loading commit data...
Executable_outdevgrind.mk Loading commit data...
Executable_svdemo.mk Loading commit data...
Executable_svpclient.mk Loading commit data...
Executable_svptest.mk Loading commit data...
Executable_tdefilepicker.mk Loading commit data...
Executable_ui-previewer.mk Loading commit data...
Executable_vcldemo.mk Loading commit data...
Executable_xid_fullscreen_on_all_monitors.mk Loading commit data...
Library_desktop_detector.mk Loading commit data...
Library_vcl.mk Loading commit data...
Library_vclplug_gen.mk Loading commit data...
Library_vclplug_gtk.mk Loading commit data...
Library_vclplug_gtk3.mk Loading commit data...
Library_vclplug_kde.mk Loading commit data...
Library_vclplug_kde4.mk Loading commit data...
Library_vclplug_tde.mk Loading commit data...
Makefile Loading commit data...
Module_vcl.mk Loading commit data...
Package_fontunxppds.mk Loading commit data...
Package_fontunxpsprint.mk Loading commit data...
Package_opengl.mk Loading commit data...
Package_osxres.mk Loading commit data...
README Loading commit data...
README.GDIMetaFile Loading commit data...
StaticLibrary_glxtest.mk Loading commit data...
StaticLibrary_vclmain.mk Loading commit data...
UIConfig_vcl.mk Loading commit data...
WinResTarget_vcl.mk Loading commit data...
vcl.android.component Loading commit data...
vcl.headless.component Loading commit data...
vcl.ios.component Loading commit data...
vcl.macosx.component Loading commit data...
vcl.unx.component Loading commit data...
vcl.windows.component Loading commit data...