summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qimagescale_sse4.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2023-02-24 10:57:56 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2023-02-25 10:54:19 +0100
commit93047c71e8e6dd4ac28e1e59dcb561df11c759eb (patch)
treeb9f80142d34015b8b61c196868b09423688fe1c8 /src/gui/painting/qimagescale_sse4.cpp
parenta861eea14f697d7fb1e06981f83158dba9591fa7 (diff)
Add special thread pool for Qt Gui
To avoid gui slowdowns due to global pool being blocked. Fixes: QTBUG-109511 Pick-to: 6.5 6.4 6.2 Change-Id: I4e8d91e8fb0bd2e395072a082e992a3c5d3464ad Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui/painting/qimagescale_sse4.cpp')
-rw-r--r--src/gui/painting/qimagescale_sse4.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qimagescale_sse4.cpp b/src/gui/painting/qimagescale_sse4.cpp
index f55290b46c..982e533a32 100644
--- a/src/gui/painting/qimagescale_sse4.cpp
+++ b/src/gui/painting/qimagescale_sse4.cpp
@@ -7,8 +7,9 @@
#include <private/qsimd_p.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
#if defined(QT_COMPILER_SUPPORTS_SSE4_1)
@@ -23,7 +24,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;