From ff57b90c0419a7058cf44413ab19d5aac7fb5f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 28 Apr 2009 10:03:58 +0200 Subject: Improved performance for pixmaps containing 0-alpha pixels. Areas of 0-alpha are quite common in ARGB images/pixmaps, so special case them in the argb32 on argb32 image blend function. Reviewed-by: Trond --- src/gui/painting/qblendfunctions.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index dd7b016..16dd617 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -518,11 +518,10 @@ static void qt_blend_argb32_on_argb32(uchar *destPixels, int dbpl, for (int y=0; y= 0xff000000) dst[x] = s; - else { + else if (s != 0) dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); - } } dst = (quint32 *)(((uchar *) dst) + dbpl); src = (const quint32 *)(((const uchar *) src) + sbpl); -- cgit v0.12