summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-28 13:42:20 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-28 13:45:27 (GMT)
commitb1b46a21ea4aae5711130850e1bb19b0728a22ec (patch)
treed982c0b6d6478108eb38fbaacf6093bdae6601d9 /src/gui/painting
parent7d0f824e023e8b4b45d67c1d3556c73d296bb5bd (diff)
downloadQt-b1b46a21ea4aae5711130850e1bb19b0728a22ec.zip
Qt-b1b46a21ea4aae5711130850e1bb19b0728a22ec.tar.gz
Qt-b1b46a21ea4aae5711130850e1bb19b0728a22ec.tar.bz2
Fix an assertion in comp_func_SourceOver_sse2() if const_alpha == 0
Const_alpha == 0 is a corner case that can happen if the painter draw with zero opacity or if the multiplication of alphas is below 1. The assertion was failing for one of the test of QPainter. Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 04fe825..6cd8688 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -299,7 +299,7 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, const uint *srcPixels, int length, uint const_alpha)
{
- Q_ASSERT(const_alpha > 0); // if const_alpha == 0, this should never be called
+ Q_ASSERT(const_alpha >= 0);
Q_ASSERT(const_alpha < 256);
const quint32 *src = (const quint32 *) srcPixels;