{
}
+void QSGCanvasPrivate::stopRenderingThread()
+{
+ if (thread->isRunning()) {
+ mutex.lock();
+ exitThread = true;
+ wait.wakeOne();
+ wait.wait(&mutex);
+ exitThread = false;
+ mutex.unlock();
+ thread->wait();
+ }
+}
+
void QSGCanvasPrivate::_q_animationStarted()
{
#ifdef THREAD_DEBUG
{
Q_D(QSGCanvas);
- if (d->threadedRendering) {
- d->mutex.lock();
- d->exitThread = true;
- d->wait.wakeOne();
- d->wait.wait(&d->mutex);
- d->exitThread = false;
- d->mutex.unlock();
- d->thread->wait();
- }
+ if (d->threadedRendering)
+ d->stopRenderingThread();
d->animationDriver->uninstall();
{
Q_D(QSGCanvas);
+ if (d->threadedRendering)
+ d->stopRenderingThread();
+
// ### should we change ~QSGItem to handle this better?
// manually cleanup for the root item (item destructor only handles these when an item is parented)
QSGItemPrivate *rootItemPrivate = QSGItemPrivate::get(d->rootItem);
void sendHoverEvent(QEvent::Type, QSGItem *, QGraphicsSceneHoverEvent *);
void clearHover();
+ void stopRenderingThread();
+
QDeclarativeGuard<QSGItem> hoverItem;
enum FocusOption {
DontChangeFocusProperty = 0x01,