summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-05-05 13:31:10 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-05-05 13:42:21 (GMT)
commitd89d1eb47e69c2c2dc1121ef92fd08ef983e3e63 (patch)
tree3b09d34e6f0a0ae2418691df7bac3e1c8a6037cb /src/gui/painting
parent2a1eed4c718c8fa4a69351691aa466339d280126 (diff)
downloadQt-d89d1eb47e69c2c2dc1121ef92fd08ef983e3e63.zip
Qt-d89d1eb47e69c2c2dc1121ef92fd08ef983e3e63.tar.gz
Qt-d89d1eb47e69c2c2dc1121ef92fd08ef983e3e63.tar.bz2
Fixed bug where 0-opacity would cause images to be drawn fully opaque.
The bug appears in the raster paint engine and only in release mode as the cause of the bug is in the MMX and SSE blend functions which are disabled in debug. To prevent it simply we return early if we detect that we have an opacity of 0. Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index ba1e27c..e249b3e 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1022,7 +1022,7 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
int alpha,
const QRect &sr)
{
- if (!clip.isValid())
+ if (alpha == 0 || !clip.isValid())
return;
Q_ASSERT(img.depth() >= 8);