From b1b46a21ea4aae5711130850e1bb19b0728a22ec Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Mon, 28 Jun 2010 15:42:20 +0200 Subject: Fix an assertion in comp_func_SourceOver_sse2() if const_alpha == 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gui/painting/qdrawhelper_sse2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12