vcl/unx/generic/glyphs/gcach_layout.cxx | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-)
New commits: commit 69885cb07b7cc8290946c97d45f0b7379dcf77b1 Author: Khaled Hosny <khaledho...@eglug.org> Date: Wed Sep 7 17:11:17 2016 +0200 Fix not-so-newly introduced perf regression in vcl Reverts f688acfdae00ebdd891737e533d54368810185e1 and the cluster boundaries part of 1da9b4c24e806ad2447b4a656e2a7192755bb6a8, checking the user of the GlyphItem::IS_IN_CLUSTER flag again, I think the old code provides what they expect. (cherry picked from commit 6323e6628668849438e6e19ba7ad2c6598263261) Change-Id: I74bcca3a203164028a0be8fe75fde73e54faba1b Reviewed-on: https://gerrit.libreoffice.org/28726 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/generic/glyphs/gcach_layout.cxx b/vcl/unx/generic/glyphs/gcach_layout.cxx index dc9a84f..d8bf44b 100644 --- a/vcl/unx/generic/glyphs/gcach_layout.cxx +++ b/vcl/unx/generic/glyphs/gcach_layout.cxx @@ -326,7 +326,6 @@ private: hb_script_t maHbScript; hb_face_t* mpHbFace; int mnUnitsPerEM; - css::uno::Reference<css::i18n::XBreakIterator> mxBreak; public: explicit HbLayoutEngine(ServerFont&); @@ -513,12 +512,6 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) hb_glyph_info_t *pHbGlyphInfos = hb_buffer_get_glyph_infos(pHbBuffer, nullptr); hb_glyph_position_t *pHbPositions = hb_buffer_get_glyph_positions(pHbBuffer, nullptr); - sal_Int32 nGraphemeStartPos = std::numeric_limits<sal_Int32>::max(); - sal_Int32 nGraphemeEndPos = std::numeric_limits<sal_Int32>::min(); - if (!mxBreak.is()) - mxBreak = vcl::unohelper::CreateBreakIterator(); - com::sun::star::lang::Locale aLocale(rArgs.maLanguageTag.getLocale()); - for (int i = 0; i < nRunGlyphCount; ++i) { int32_t nGlyphIndex = pHbGlyphInfos[i].codepoint; int32_t nCharPos = pHbGlyphInfos[i].cluster; @@ -539,22 +532,8 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) nGlyphIndex = rFont.FixupGlyphIndex(nGlyphIndex, aChar); bool bInCluster = false; - if(bRightToLeft && (nCharPos < nGraphemeStartPos)) - { - sal_Int32 nDone; - nGraphemeStartPos = mxBreak->previousCharacters(rArgs.mrStr, nCharPos+1, aLocale, - com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); - } - else if(!bRightToLeft && (nCharPos >= nGraphemeEndPos)) - { - sal_Int32 nDone; - nGraphemeEndPos = mxBreak->nextCharacters(rArgs.mrStr, nCharPos, aLocale, - com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); - } - else - { + if (i > 0 && pHbGlyphInfos[i].cluster == pHbGlyphInfos[i - 1].cluster) bInCluster = true; - } long nGlyphFlags = 0; if (bRightToLeft)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits