vcl/generic/glyphs/gcach_layout.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 8a58579a35bb275c985ff0fd412c92f10cd8a085 Author: Michael Stahl <[email protected]> Date: Tue Feb 24 21:32:54 2015 +0100 tdf#89666: vcl: speed up HbLayoutEngine line layout for large paragraphs When formatting a 180k char Writer paragraph, most of the time is spent in vcl::ScriptRun::next(), which is called twice per line from SwTxtGuess::Guess(), once via GetTxtBreak() and once via GetTxtSize(). In the second call, from GetTxtSize(), the end position of the line is known, and passed to vcl, and iterating beyond that position seems pointless. This reduces vcl::ScriptRun::next() from 24 to 11 billion callgrind cycles when built with GCC 4.9.2 -m32 -Os. Change-Id: Ia23fcccaf5ef9c9ecdcb54bfc8f0f8a043c8711e (cherry picked from commit 7fde44c85620f8079bc4863fe3f7ea1f69a0f88c) Reviewed-on: https://gerrit.libreoffice.org/14646 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index abd04ba..f7523a1 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -372,7 +372,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) rLayout.Reserve(nGlyphCapacity); - vcl::ScriptRun aScriptRun(reinterpret_cast<const UChar *>(rArgs.mpStr), rArgs.mnLength); + vcl::ScriptRun aScriptRun(reinterpret_cast<const UChar *>(rArgs.mpStr), rArgs.mnEndCharPos); Point aCurrPos(0, 0); while (true)
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
