67 lines
2.5 KiB
Diff
67 lines
2.5 KiB
Diff
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
|
|
--- a/src/gui/painting/qpainter.cpp
|
|
+++ b/src/gui/painting/qpainter.cpp
|
|
@@ -4773,6 +4773,9 @@ void QPainter::drawLines(const QLine *lines, int lineCount)
|
|
if (lineEmulation) {
|
|
if (lineEmulation == QPaintEngine::PrimitiveTransform
|
|
&& d->state->matrix.type() == QTransform::TxTranslate) {
|
|
+#if defined(__e2k__)
|
|
+#pragma loop count(1000)
|
|
+#endif
|
|
for (int i = 0; i < lineCount; ++i) {
|
|
QLineF line = lines[i];
|
|
line.translate(d->state->matrix.dx(), d->state->matrix.dy());
|
|
@@ -4780,6 +4783,9 @@ void QPainter::drawLines(const QLine *lines, int lineCount)
|
|
}
|
|
} else {
|
|
QPainterPath linePath;
|
|
+#if defined(__e2k__)
|
|
+#pragma loop count(1000)
|
|
+#endif
|
|
for (int i = 0; i < lineCount; ++i) {
|
|
linePath.moveTo(lines[i].p1());
|
|
linePath.lineTo(lines[i].p2());
|
|
diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h
|
|
--- a/src/gui/painting/qblendfunctions_p.h
|
|
+++ b/src/gui/painting/qblendfunctions_p.h
|
|
@@ -258,6 +258,39 @@
|
|
const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
|
|
quint32 srcx = basex;
|
|
int x = 0;
|
|
+ int ix2 = ix * 2;
|
|
+ int ix3 = ix * 3;
|
|
+ int ix4 = ix * 4;
|
|
+ int ix5 = ix * 5;
|
|
+ int ix6 = ix * 6;
|
|
+ int ix7 = ix * 7;
|
|
+ // Prefetch src line
|
|
+ for(char *ss = (char *)src; ss < sbpl + (char *)src; ss += 64)
|
|
+ {
|
|
+ __builtin_prefetch(ss, 0);
|
|
+ }
|
|
+#pragma loop count(1000)
|
|
+#pragma unroll(1)
|
|
+ for (; x<w-6; x+=7) {
|
|
+ __builtin_prefetch(&dst[x], 1);
|
|
+ uint v0 = src[(srcx) >> 16];
|
|
+ uint v1 = src[(srcx+ix) >> 16];
|
|
+ uint v2 = src[(srcx+ix2) >> 16];
|
|
+ uint v3 = src[(srcx+ix3) >> 16];
|
|
+ uint v4 = src[(srcx+ix4) >> 16];
|
|
+ uint v5 = src[(srcx+ix5) >> 16];
|
|
+ uint v6 = src[(srcx+ix6) >> 16];
|
|
+ srcx += ix7;
|
|
+ blender.write(&dst[x], v0);
|
|
+ blender.write(&dst[x+1], v1);
|
|
+ blender.write(&dst[x+2], v2);
|
|
+ blender.write(&dst[x+3], v3);
|
|
+ blender.write(&dst[x+4], v4);
|
|
+ blender.write(&dst[x+5], v5);
|
|
+ blender.write(&dst[x+6], v6);
|
|
+ }
|
|
+#pragma loop count(7)
|
|
+#pragma unroll(1)
|
|
for (; x<w; ++x) {
|
|
blender.write(&dst[x], src[srcx >> 16]);
|
|
srcx += ix;
|