summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-12-07 13:08:44 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2016-12-08 12:40:58 +0000
commitd829dd3f445afae8c74630c4c8b93347b4a7c7bd (patch)
tree661d3b1127d64dbd0163aea6060204bacf4b2ea0 /src/gui/painting/qdrawhelper.cpp
parente2978d6097be2313e49c57ec14618033cbfa7414 (diff)
Fix inconsistent alpha masking in qConvertARGB32PMToARGB64PM_sse2
The prolog and epilog did not force RGB32 to be converted to RGB64 with alpha fully defined like the middle optimized part. Change-Id: If7c4829f2239f9a3c524f78b9ce269e2b0b5b150 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r--src/gui/painting/qdrawhelper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 8700a0fce1..ff7c8dfc28 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -580,6 +580,8 @@ static inline void qConvertARGB32PMToARGB64PM_sse2(QRgba64 *buffer, const uint *
int i = 0;
for (; ((uintptr_t)buffer & 0xf) && i < count; ++i) {
uint s = *src++;
+ if (maskAlpha)
+ s = s | 0xff000000;
if (RGBA)
s = RGBA2ARGB(s);
*buffer++ = QRgba64::fromArgb32(s);
@@ -605,6 +607,8 @@ static inline void qConvertARGB32PMToARGB64PM_sse2(QRgba64 *buffer, const uint *
SIMD_EPILOGUE(i, count, 3) {
uint s = *src++;
+ if (maskAlpha)
+ s = s | 0xff000000;
if (RGBA)
s = RGBA2ARGB(s);
*buffer++ = QRgba64::fromArgb32(s);