Multithread qdrawhelper routines

Adds multi-threading to span handling routines in
qdrawhelper, effectively multi-threading almost all fills.

Also increases the number of spans processed at a time to
make the multithreading wider.

Change-Id: Iad04e187f880666855bebcd87d668f6c6fb5db7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
Allan Sandfeld Jensen 2019-11-26 17:50:25 +01:00
parent 3346611a47
commit b18959ad7e
2 changed files with 548 additions and 478 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1457,7 +1457,7 @@ static void fillRect_normalized(const QRect &r, QSpanData *data,
ProcessSpans blend = isUnclipped ? data->unclipped_blend : data->blend; ProcessSpans blend = isUnclipped ? data->unclipped_blend : data->blend;
const int nspans = 256; const int nspans = 512;
QT_FT_Span spans[nspans]; QT_FT_Span spans[nspans];
Q_ASSERT(data->blend); Q_ASSERT(data->blend);
@ -2700,7 +2700,7 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
if (w <= 0 || h <= 0) if (w <= 0 || h <= 0)
return; return;
const int NSPANS = 256; const int NSPANS = 512;
QSpan spans[NSPANS]; QSpan spans[NSPANS];
int current = 0; int current = 0;
@ -3424,7 +3424,7 @@ void QRasterPaintEngine::drawBitmap(const QPointF &pos, const QImage &image, QSp
Q_ASSERT(image.depth() == 1); Q_ASSERT(image.depth() == 1);
const int spanCount = 256; const int spanCount = 512;
QT_FT_Span spans[spanCount]; QT_FT_Span spans[spanCount];
int n = 0; int n = 0;
@ -4124,7 +4124,7 @@ static void qt_span_fill_clipped(int spanCount, const QSpan *spans, void *userDa
Q_ASSERT(fillData->blend && fillData->unclipped_blend); Q_ASSERT(fillData->blend && fillData->unclipped_blend);
const int NSPANS = 256; const int NSPANS = 512;
QSpan cspans[NSPANS]; QSpan cspans[NSPANS];
int currentClip = 0; int currentClip = 0;
const QSpan *end = spans + spanCount; const QSpan *end = spans + spanCount;