aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgadaptationlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer.cpp')
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp
index ee077dbaf1..68b1882c3f 100644
--- a/src/quick/scenegraph/qsgadaptationlayer.cpp
+++ b/src/quick/scenegraph/qsgadaptationlayer.cpp
@@ -328,6 +328,7 @@ void QSGNodeVisitorEx::visitChildren(QSGNode *node)
}
break;
}
+ case QSGNode::RootNodeType: // fall through
case QSGNode::BasicNodeType: {
visitChildren(child);
break;
@@ -339,4 +340,25 @@ void QSGNodeVisitorEx::visitChildren(QSGNode *node)
}
}
+void QSGLayer::markDirtyTextureLater()
+{
+ QCoreApplication::postEvent(this, new QEvent(static_cast<QEvent::Type>(markDirtyEventType())));
+}
+
+void QSGLayer::customEvent(QEvent *event)
+{
+ if (event->type() == markDirtyEventType())
+ markDirtyTexture();
+ else
+ QObject::customEvent(event);
+}
+
+int QSGLayer::markDirtyEventType()
+{
+ static int type = QEvent::None;
+ if (type == QEvent::None)
+ type = QEvent::registerEventType();
+ return type;
+}
+
QT_END_NAMESPACE