aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-03-17 18:40:02 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-03-18 10:17:01 +0100
commitb1e89b57667c95f3ad81076b5fd3c57272435450 (patch)
tree7a62a919594bb5c8e8688a13f4d649b8b88bbed6 /src/quick/scenegraph/qsgcontext.cpp
parent869efe4a49c5286493d7f039325992725bcac6c3 (diff)
rhi: Enable layer updateTexture(), and so grabs, in the sync phase
Calling updateTexture() from an updatePaintNode() implementation means we are still in the synchronization phase, with the render step (as in QQuickWindow::renderSceneGraph()) not started yet. Make sure the QRhiCommandBuffer is sent around early enough, so it is usable by QSGRhiLayer already during sync. There is no use case for this in Qt Quick itself since all standard items invoke updateTexture() from QSGNode::preprocess() (which is part of the render, not the sync, step), but Qt Quick 3D relies on this in Texture.sourceItem. This should fix the sourceitem manual test in Qt Quick 3D, so that it will not crash anymore when running with RHI enabled. Task-number: QTBUG-82927 Change-Id: I38adf512e49b1c6eef4730cd23663d351725d6cd Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 17eb1e312c..e3c951e5ed 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -341,9 +341,10 @@ void QSGRenderContext::invalidate()
{
}
-void QSGRenderContext::prepareSync(qreal devicePixelRatio)
+void QSGRenderContext::prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb)
{
Q_UNUSED(devicePixelRatio);
+ Q_UNUSED(cb);
}
void QSGRenderContext::beginNextFrame(QSGRenderer *renderer,