From 977ef099b21031363e0d0b9b04d77f373c4dd03b Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Tue, 23 Sep 2014 12:43:41 +0200 Subject: 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 --- src/plugins/scenegraph/softwarecontext/context.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3