summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-14 15:55:48 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-14 15:11:14 +0000
commita93096a77030b3ffa810265fdf2e9616e2929092 (patch)
tree8dee37c0de6db8af92fa054630c6bad271219908 /src/gui/painting/qdrawhelper.cpp
parented245f3e70661a1e02467393918feef4b5af8197 (diff)
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 <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r--src/gui/painting/qdrawhelper.cpp2
1 files changed, 2 insertions, 0 deletions
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);