void QSGCanvasPrivate::syncSceneGraph()
{
+ inSync = true;
updateDirtyNodes();
+ inSync = false;
}
, idle(false)
, needsRepaint(true)
, renderThreadAwakened(false)
+ , inSync(false)
, thread(new MyThread(this))
, animationDriver(0)
{
qWarning("QSGRenderer: now maybe I should update...");
#endif
d->wait.wakeOne();
+ } else if (d->inSync) {
+ // If we are in sync (on scene graph thread) someone has explicitely asked us
+ // to redraw, hence we tell the render loop to not go idle.
+ // The primary usecase for this is updatePaintNode() calling update() without
+ // changing the scene graph.
+ d->needsRepaint = true;
}
if (locked)
d->mutex.unlock();
uint idle : 1; // Set to true when render thread sees no change and enters a wait()
uint needsRepaint : 1; // Set by callback from render if scene needs repainting.
uint renderThreadAwakened : 1;
+ uint inSync: 1;
struct MyThread : public QThread {
MyThread(QSGCanvasPrivate *r) : renderer(r) {}