From 39f76b4325d1d5b7dd28e9e80f1a8ba7378c7e54 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 25 Jan 2018 18:00:50 +0100 Subject: 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 --- src/gui/painting/qdrawhelper_avx2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') 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); -- cgit v1.2.3