Fix multiple threads accessing same byte
We can not thread mono image formats as the bit access isn't atomic. Pick-to: 6.6 6.5 Fixes: QTBUG-117494 Change-Id: Ica8e08fc3da73983f6b4da2a133f5e715fd0d787 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
78512135c8
commit
6532dc5d37
@ -3779,7 +3779,8 @@ static void spanfill_from_first(QRasterBuffer *rasterBuffer, QPixelLayout::BPP b
|
||||
#define QT_THREAD_PARALLEL_FILLS(function) \
|
||||
const int segments = (count + 32) / 64; \
|
||||
QThreadPool *threadPool = QThreadPoolPrivate::qtGuiInstance(); \
|
||||
if (segments > 1 && threadPool && !threadPool->contains(QThread::currentThread())) { \
|
||||
if (segments > 1 && qPixelLayouts[data->rasterBuffer->format].bpp >= QPixelLayout::BPP8 \
|
||||
&& threadPool && !threadPool->contains(QThread::currentThread())) { \
|
||||
QSemaphore semaphore; \
|
||||
int c = 0; \
|
||||
for (int i = 0; i < segments; ++i) { \
|
||||
|
Loading…
Reference in New Issue
Block a user