summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-21 14:05:42 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-04-21 23:18:23 (GMT)
commita8b6d332a6639b5dd2f3ac938251b12b7e4ad406 (patch)
tree7b349ceb0c54de38875813ad277e36e789d072dc
parent386eee20daaf77fd3b0a2c4c33de00083d538c65 (diff)
downloadQt-a8b6d332a6639b5dd2f3ac938251b12b7e4ad406.zip
Qt-a8b6d332a6639b5dd2f3ac938251b12b7e4ad406.tar.gz
Qt-a8b6d332a6639b5dd2f3ac938251b12b7e4ad406.tar.bz2
BT: Revert "Fixes: Don't fill the pixmap because we will copy the cache into it."
This reverts commit 0985805ab3c7de5b15c115a98afb15944b6d93b9. The Elastic Nodes example shows a black background for the cache pixmap if the call to fill isn't there. Alexis and I both agree that it makes no sense that we fill the pixmap with transparent pixels instead of just drawing with QPainter::CompositionMode_Source, but since this regression was introduced after 4.5.0 was released we must revert before we investigate further. Reviewed-by: Alexis (cherry picked from commit 183cb6052c45d7c83e36c78da4e2c59c768209c7)
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 5cd69b3..0012d98 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4890,9 +4890,11 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
if (newCacheIndent != deviceData->cacheIndent || deviceRect.size() != pix.size()) {
QPoint diff = newCacheIndent - deviceData->cacheIndent;
QPixmap newPix(deviceRect.size());
+ // ### Investigate removing this fill (test with Plasma and
+ // graphicssystem raster).
+ newPix.fill(Qt::transparent);
if (!pix.isNull()) {
QPainter newPixPainter(&newPix);
- newPixPainter.setCompositionMode(QPainter::CompositionMode_Source);
newPixPainter.drawPixmap(-diff, pix);
newPixPainter.end();
}