aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-07-14 12:43:46 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-07-15 09:30:31 +0000
commitc2414e16aba2ad499a49d3661a2961795c9a9dc9 (patch)
tree08c8d0a06bc4c9bb218f45739daf3b48540cd2d0 /src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
parent12de7bbc1ee2959f4e31a345b4573242d34474cf (diff)
Fix rendercontrol grabs with the software backend
Calling grabWindow recurses (since that is implemented via QQuickRenderControl::grab...) so it's not an option. Instead, call directly in the software renderer implementation. Fix also the size of the offscreen QQuickWindow when using QQuickWidget in combination with the software backend. Change-Id: I857a2cc0aebbbaa5d52d809aeaec37c15b0787b9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp b/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
index 26efba5b13..a6cb99ae05 100644
--- a/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
@@ -236,7 +236,7 @@ void QSGAbstractSoftwareRenderer::setBackgroundSize(const QSize &size)
m_background->setRect(0.0f, 0.0f, size.width(), size.height());
renderableNode(m_background)->markGeometryDirty();
// Invalidate the whole scene when the background is resized
- m_dirtyRegion = QRegion(m_background->rect().toRect());
+ markDirty();
}
QColor QSGAbstractSoftwareRenderer::backgroundColor()
@@ -322,4 +322,9 @@ void QSGAbstractSoftwareRenderer::nodeOpacityUpdated(QSGNode *node)
m_nodeUpdater->updateNodes(node);
}
+void QSGAbstractSoftwareRenderer::markDirty()
+{
+ m_dirtyRegion = QRegion(m_background->rect().toRect());
+}
+
QT_END_NAMESPACE