summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawingprimitive_sse2_p.h
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-07-18 07:30:35 +0200
committerAndreas Kling <andreas.kling@nokia.com>2010-07-18 07:34:10 +0200
commit23ea4340a622cbfed81eb7afb2e09ec64b0ebef8 (patch)
treea6eca48b9e24f42999f612d7e350d8dddbb8d28a /src/gui/painting/qdrawingprimitive_sse2_p.h
parentb6786bd94b7300c7b8ebe56a3c88f12a13a05119 (diff)
Corrected BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2
The unaligned prologue was processed without using the const alpha. Regressed with 9427b4c8f3b5.
Diffstat (limited to 'src/gui/painting/qdrawingprimitive_sse2_p.h')
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index b1f83066e8..18355c278b 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -205,11 +205,11 @@ QT_BEGIN_NAMESPACE
const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\
const int prologLength = qMin(length, offsetToAlignOn16Bytes);\
for (; x < prologLength; ++x) { \
- uint s = src[x]; \
- if (s >= 0xff000000) \
- dst[x] = s; \
- else if (s != 0) \
+ quint32 s = src[x]; \
+ if (s != 0) { \
+ s = BYTE_MUL(s, const_alpha); \
dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); \
+ } \
} \
\
for (; x < length-3; x += 4) { \