summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@digia.com>2014-09-23 12:43:41 +0200
committerAndy Nichols <andy.nichols@digia.com>2014-09-30 11:33:54 +0300
commit977ef099b21031363e0d0b9b04d77f373c4dd03b (patch)
tree324f6ca4fd57f93476089a55d4dfc167930577ae
parent255773dcba72817fea1295462337948ef91e996c (diff)
Make sure to clear backingstore with Source Composition Mode
This prevents blending with either garbage or the contents of the previous buffer when clearing with colors with an alpha. Change-Id: I52fc13c2af224a37206e51efd38301b95085c9b2 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
-rw-r--r--src/plugins/scenegraph/softwarecontext/context.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/scenegraph/softwarecontext/context.cpp b/src/plugins/scenegraph/softwarecontext/context.cpp
index 42780209c2..1d3bec674d 100644
--- a/src/plugins/scenegraph/softwarecontext/context.cpp
+++ b/src/plugins/scenegraph/softwarecontext/context.cpp
@@ -82,8 +82,9 @@ void Renderer::render()
QPaintDevice *device = m_backingStore->paintDevice();
QPainter painter(device);
painter.setRenderHint(QPainter::Antialiasing);
-
+ painter.setCompositionMode(QPainter::CompositionMode_Source);
painter.fillRect(rect, clearColor());
+ painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
RenderingVisitor(&painter).visitChildren(rootNode());
m_backingStore->endPaint();