diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2023-02-24 10:57:56 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-25 12:18:09 +0000 |
commit | 8f2a3714dca5143ba3f919bdebb3e11e5a6c7cc3 (patch) | |
tree | 9abd16c0b0ae015c23eddef4475ce6535cbe74ee /src/gui/painting/qimagescale.cpp | |
parent | 41836354e6e98cb54208282a0fdb8e8b599b7101 (diff) | |
download | qtbase-8f2a3714dca5143ba3f919bdebb3e11e5a6c7cc3.tar.gz |
Add special thread pool for Qt Gui
To avoid gui slowdowns due to global pool being blocked.
Fixes: QTBUG-109511
Change-Id: I4e8d91e8fb0bd2e395072a082e992a3c5d3464ad
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 93047c71e8e6dd4ac28e1e59dcb561df11c759eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/painting/qimagescale.cpp')
-rw-r--r-- | src/gui/painting/qimagescale.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp index 80d1a67a3f..a636635fd5 100644 --- a/src/gui/painting/qimagescale.cpp +++ b/src/gui/painting/qimagescale.cpp @@ -10,8 +10,9 @@ #include "qrgbafloat.h" #if QT_CONFIG(thread) && !defined(Q_OS_WASM) -#include "qsemaphore.h" -#include "qthreadpool.h" +#include <qsemaphore.h> +#include <qthreadpool.h> +#include <private/qthreadpool_p.h> #endif QT_BEGIN_NAMESPACE @@ -273,7 +274,7 @@ static inline void multithread_pixels_function(QImageScaleInfo *isi, int dh, con #if QT_CONFIG(thread) && !defined(Q_OS_WASM) int segments = (qsizetype(isi->sh) * isi->sw) / (1<<16); segments = std::min(segments, dh); - QThreadPool *threadPool = QThreadPool::globalInstance(); + QThreadPool *threadPool = QThreadPoolPrivate::qtGuiInstance(); if (segments > 1 && threadPool && !threadPool->contains(QThread::currentThread())) { QSemaphore semaphore; int y = 0; |