From a93096a77030b3ffa810265fdf2e9616e2929092 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 14 Mar 2018 15:55:48 +0100 Subject: Fix performance regression in simple a8 non-gamma corrected Avoid doing the conversion over QRgba64 when we don't need it. Change-Id: Ic2f82bef0a80b17ef7803eedcdb0600eeac96489 Reviewed-by: Lars Knoll --- src/gui/painting/qdrawhelper.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/painting/qdrawhelper.cpp') diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 23c8e42ded..f08038e34b 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -5670,6 +5670,8 @@ static inline void alphamapblend_argb32(quint32 *dst, int coverage, QRgba64 srcL // nothing } else if (coverage == 255) { *dst = src; + } else if (!colorProfile) { + *dst = INTERPOLATE_PIXEL_255(src, coverage, *dst, 255 - coverage); } else { if (*dst >= 0xff000000) { grayBlendPixel(dst, coverage, srcLinear, colorProfile); -- cgit v1.2.3