From b1e082ec9f4ec0a603f69e280fe2c5438c67a09e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 16 Aug 2012 09:53:44 +0200 Subject: Fix performence problem while shaping a lines with many scripts Fix quadradic behaviour regression introduced in commit 2e6b8b4734710377e25c199e3ff7865628e7d723 Task-number: QTBUG-22275 Change-Id: I343452c6b1cd0e571770e5dadd3cd6fd3167c96d Reviewed-by: Lars Knoll --- src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/3rdparty/harfbuzz') diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index 6f663d5f9b..1024c8162f 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -884,7 +884,7 @@ HB_Bool HB_SelectScript(HB_ShaperItem *shaper_item, const HB_OpenTypeFeature *fe static HB_Bool containsSurrogates(HB_ShaperItem *item) { - for (hb_uint32 i=0; istringLength; ++i) { + for (hb_uint32 i=item->item.pos; iitem.pos+item->item.length; ++i) { HB_UChar16 ucs = item->string[i]; if ( HB_IsHighSurrogate(ucs) || HB_IsLowSurrogate(ucs) ) return true; -- cgit v1.2.3