summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-25 18:00:50 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-27 00:34:15 +0000
commit39f76b4325d1d5b7dd28e9e80f1a8ba7378c7e54 (patch)
tree375dd5a249c08b26defdcf440d00461a534ca5c0 /src/gui
parentcb612491b371675c6b028deabacf5c1492370330 (diff)
Fix broken rendering of RGB30 and ARGB32 on machines with AVX2
Two small changes late in the review process were flawed. Change-Id: I4b1f6e3fdb8e17000a2e11bc30aae1b29d9f43a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qdrawhelper_avx2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp
index cf89f408b5..3a70524a9d 100644
--- a/src/gui/painting/qdrawhelper_avx2.cpp
+++ b/src/gui/painting/qdrawhelper_avx2.cpp
@@ -427,7 +427,7 @@ void QT_FASTCALL comp_func_Source_rgb64_avx2(QRgba64 *dst, const QRgba64 *src, i
::memcpy(dst, src, length * sizeof(QRgba64));
} else {
const uint ca = const_alpha | (const_alpha << 8); // adjust to [0-65535]
- const uint cia = 65535 - const_alpha;
+ const uint cia = 65535 - ca;
int x = 0;
@@ -493,7 +493,7 @@ void QT_FASTCALL comp_func_solid_SourceOver_rgb64_avx2(QRgba64 *destPixels, int
if (const_alpha != 255)
color = multiplyAlpha255(color, const_alpha);
- const uint minusAlphaOfColor = ~ushort(color.alpha());
+ const uint minusAlphaOfColor = 65535 - color.alpha();
int x = 0;
quint64 *dst = (quint64 *) destPixels;
const __m256i colorVector = _mm256_set1_epi64x(color);