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