cleanupNodeList.clear();
}
+void QQuickCanvasPrivate::cleanupNodesOnShutdown(QQuickItem *item)
+{
+ QQuickItemPrivate *p = QQuickItemPrivate::get(item);
+ if (p->itemNodeInstance) {
+ delete p->itemNodeInstance;
+ p->itemNodeInstance = 0;
+ p->opacityNode = 0;
+ p->clipNode = 0;
+ p->groupNode = 0;
+ p->paintNode = 0;
+ }
+
+ for (int ii = 0; ii < p->childItems.count(); ++ii)
+ cleanupNodesOnShutdown(p->childItems.at(ii));
+}
+
+// This must be called from the render thread, with the main thread frozen
+void QQuickCanvasPrivate::cleanupNodesOnShutdown()
+{
+ cleanupNodes();
+
+ cleanupNodesOnShutdown(rootItem);
+}
+
void QQuickCanvasPrivate::updateDirtyNodes()
{
#ifdef DIRTY_DEBUG
}
#ifdef THREAD_DEBUG
+ printf(" RenderThread: deleting all outstanding nodes\n");
+#endif
+ cleanupNodesOnShutdown();
+
+#ifdef THREAD_DEBUG
printf(" RenderThread: render loop exited... Good Night!\n");
#endif
void updateDirtyNodes();
void cleanupNodes();
+ void cleanupNodesOnShutdown();
bool updateEffectiveOpacity(QQuickItem *);
void updateEffectiveOpacityRoot(QQuickItem *, qreal);
void updateDirtyNode(QQuickItem *);
QHash<int, QQuickItem *> itemForTouchPointId;
mutable QQuickCanvasIncubationController *incubationController;
+private:
+ static void cleanupNodesOnShutdown(QQuickItem *);
};
class QQuickCanvasRenderLoop
protected:
void initializeSceneGraph() { d->initializeSceneGraph(); }
void syncSceneGraph() { d->syncSceneGraph(); }
+ void cleanupNodesOnShutdown() { d->cleanupNodesOnShutdown(); }
void renderSceneGraph(const QSize &size) { d->renderSceneGraph(size); }
void polishItems() { d->polishItems(); }
QAnimationDriver *animationDriver() const { return d->animationDriver; }