summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-13 21:41:32 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-13 21:41:32 (GMT)
commitf4dc906af870b2ed0d1446bb223e70db31791e8b (patch)
tree7d1584f8f344065c9a7170ea506a90256ad492e1 /src
parent870ecb5b44a56b29d16a4819c2d92298801cf98f (diff)
parentb5cd029cdd700069e603fe27049f3afb999a234c (diff)
downloadQt-f4dc906af870b2ed0d1446bb223e70db31791e8b.zip
Qt-f4dc906af870b2ed0d1446bb223e70db31791e8b.tar.gz
Qt-f4dc906af870b2ed0d1446bb223e70db31791e8b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Use aligned operations for solid SourceOver operations.
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index ac73958..f97d865 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -300,11 +300,14 @@ void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, u
const __m128i half = _mm_set1_epi16(0x80);
const __m128i minusAlphaOfColorVector = _mm_set1_epi16(minusAlphaOfColor);
+ ALIGNMENT_PROLOGUE_16BYTES(dst, x, length)
+ destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);
+
for (; x < length-3; x += 4) {
- __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]);
+ __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
BYTE_MUL_SSE2(dstVector, dstVector, minusAlphaOfColorVector, colorMask, half);
dstVector = _mm_add_epi8(colorVector, dstVector);
- _mm_storeu_si128((__m128i *)&dst[x], dstVector);
+ _mm_store_si128((__m128i *)&dst[x], dstVector);
}
for (;x < length; ++x)
destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);