From cc4954e9646cd93d9710e4e28942d2a82762771e Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Mon, 20 Jun 2016 14:45:29 +0200 Subject: Software Renderer: Call QBackingStore::beginPaint with correct QRegion When rendering into QBackingStores, it is important to let the backingstore know what region you intended to paint into before you start rendering. Previously we were calling QBackingStore::beginPaint on the whole window area, but then only rendering and flushing for a subset of that area. This causes issues on platforms that depend on QBackingStore::beginPaint to be all area that will be repainted before the next flush, so that they can for example clear those areas. This change required a bit of extra plumbing in the Software Renderer, but now it is possible to calculate the area that will be repainted before painting it, and pass that region to QBackingStore::beginPaint(). Change-Id: I90be1916ebbe8fc182cd13246bb6690cc7e16d27 Reviewed-by: Laszlo Agocs --- src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp') diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp index 5292e1371f..0b111c7b19 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp @@ -156,11 +156,9 @@ void QSGSoftwareRenderLoop::renderWindow(QQuickWindow *window) //Tell the renderer about the windows backing store auto softwareRenderer = static_cast(cd->renderer); if (softwareRenderer) - softwareRenderer->setCurrentPaintDevice(m_backingStores[window]->paintDevice()); + softwareRenderer->setBackingStore(m_backingStores[window]); - m_backingStores[window]->beginPaint(QRect(0, 0, window->width(), window->height())); cd->renderSceneGraph(window->size()); - m_backingStores[window]->endPaint(); if (profileFrames) renderTime = renderTimer.nsecsElapsed(); -- cgit v1.2.3