summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2016-06-14 18:18:13 +0200
committerPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2016-06-14 18:22:33 +0000
commit666e7477adac2fd98420371fd89f02e7b0807fca (patch)
treee96e816e81b802a0886e4e5d668d983c26bff8a8 /src/compositor/compositor_api
parent06e8770129d5c49bfb518b02b3ece6d529e0e4c3 (diff)
Fixed invalid texture error when unhiding QWaylandQuickItems.
When creating new scene-graph nodes (which is the case when re-parenting items), no texture is attached to the node, leading to an abort due to an invalid scene-graph. Change-Id: I4cc1fd3cbce5f90362bc18b87a76b462d0d62377 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/compositor/compositor_api')
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index ab11ff4f8..f9cf45ff6 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -1051,8 +1051,10 @@ QSGNode *QWaylandQuickItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat
if (ref.isShm() || bufferTypes[ref.bufferFormatEgl()].canProvideTexture) {
QSGSimpleTextureNode *node = static_cast<QSGSimpleTextureNode *>(oldNode);
- if (!node)
+ if (!node) {
node = new QSGSimpleTextureNode();
+ d->newTexture = true;
+ }
if (!d->provider)
d->provider = new QWaylandSurfaceTextureProvider();
@@ -1072,8 +1074,10 @@ QSGNode *QWaylandQuickItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat
QSGGeometryNode *node = static_cast<QSGGeometryNode *>(oldNode);
- if (!node)
+ if (!node) {
node = new QSGGeometryNode;
+ d->newTexture = true;
+ }
QSGGeometry *geometry = node->geometry();
QWaylandBufferMaterial *material = static_cast<QWaylandBufferMaterial *>(node->material());