49#if QT_CONFIG(qtgui_threadpool)
50 int segments = (qsizetype(isi->sh) * isi->sw) / (1<<16);
51 segments = std::min(segments, dh);
52 QThreadPool *threadPool = QGuiApplicationPrivate::qtGuiThreadPool();
53 if (segments > 1 && threadPool && !threadPool->contains(QThread::currentThread())) {
54 QLatch latch(segments);
56 for (
int i = 0; i < segments; ++i) {
57 int yn = (dh - y) / (segments - i);
58 threadPool->start([&, y, yn]() {
59 scaleSection(y, y + yn);