summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2014-11-20 13:41:05 (GMT)
committerAshish Kulkarni <kulkarni.ashish@gmail.com>2014-11-22 05:14:41 (GMT)
commitd2331362a237d5bb50eae2ee48ab8719b68b0374 (patch)
treeb37bd1fac47db6e5c9d6c215568554f53c1489da /src
parent1a57e3eec9dc0fe6381d3e5bf161df150fe3e115 (diff)
downloadQt-d2331362a237d5bb50eae2ee48ab8719b68b0374.zip
Qt-d2331362a237d5bb50eae2ee48ab8719b68b0374.tar.gz
Qt-d2331362a237d5bb50eae2ee48ab8719b68b0374.tar.bz2
Fix thai symbol rendering slowness
Harfbuzz is constantly trying to load libthai in src/3rdparty/harfbuzz/src/harfbuzz-thai.c, making rendering of thai symbols very slow. Task-number: QTBUG-37665 Change-Id: I30a2a5489271534eeacc205d8106b22130c40c5f (cherry picked from qtbase/47e6ec0736aa129e181e0b6f02cec884f9832432) Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index 3c0ffe8..039394a 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -53,12 +53,14 @@ static th_render_cell_win_def th_render_cell_win = 0;
static th_render_cell_mac_def th_render_cell_mac = 0;
static int init_libthai() {
- if (!th_brk || !th_next_cell || !th_render_cell_tis || !th_render_cell_win || !th_render_cell_mac) {
+ static HB_Bool initialized = false;
+ if (!initialized && (!th_brk || !th_next_cell || !th_render_cell_tis || !th_render_cell_win || !th_render_cell_mac)) {
th_brk = (th_brk_def) HB_Library_Resolve("thai", (int)LIBTHAI_MAJOR, "th_brk");
th_next_cell = (th_next_cell_def)HB_Library_Resolve("thai", LIBTHAI_MAJOR, "th_next_cell");
th_render_cell_tis = (th_render_cell_tis_def) HB_Library_Resolve("thai", (int)LIBTHAI_MAJOR, "th_render_cell_tis");
th_render_cell_win = (th_render_cell_win_def) HB_Library_Resolve("thai", (int)LIBTHAI_MAJOR, "th_render_cell_win");
th_render_cell_mac = (th_render_cell_mac_def) HB_Library_Resolve("thai", (int)LIBTHAI_MAJOR, "th_render_cell_mac");
+ initialized = true;
}
if (th_brk && th_next_cell && th_render_cell_tis && th_render_cell_win && th_render_cell_mac)
return 1;