aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgthreadedrenderloop_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-03-17 13:45:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-24 15:40:24 +0100
commit7ca521460272f95f76c75bb2155e28093cd6292d (patch)
treefdd3c143c197aa08aa98ab618b6fcad397297834 /src/quick/scenegraph/qsgthreadedrenderloop_p.h
parentaa578c4e296a3bf5117fd878fcac70d1c11bd255 (diff)
Try to simplify the threaded render loop.
This beast has grown and grown for some time so it was time to take step back and look at a few of the problems again. 1. show/hide vs exposed/obscured. There is really no reason why we should even bother with show. It only adds the window to a list, we can do that in handleExposure and simplify things a bit. 2. Expose, polish, repaint, sync stuff was growing increasingly complex with multiple waits and several events and states interacting. So I merged the expose into the sync and passed that information along to the render thread. The render thread now knows if the sync is for a normal state-sync or an expose. For a normal sync it will wake GUI right away. For an expose, it waits until after the renderpass has completed and the frame is swapped. Change-Id: I0b9e5135215662a43fb4ff2a51438e33c845c4a7 Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/scenegraph/qsgthreadedrenderloop_p.h')
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop_p.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
index e142f7f2c8..c347190e2b 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h
+++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
@@ -58,8 +58,8 @@ class QSGThreadedRenderLoop : public QSGRenderLoop
public:
QSGThreadedRenderLoop();
- void show(QQuickWindow *window);
- void hide(QQuickWindow *window);
+ void show(QQuickWindow *) {}
+ void hide(QQuickWindow *);
void windowDestroyed(QQuickWindow *window);
void exposureChanged(QQuickWindow *window);
@@ -73,7 +73,7 @@ public:
QAnimationDriver *animationDriver() const;
- void releaseResources(QQuickWindow *window) { releaseResources(window, false); }
+ void releaseResources(QQuickWindow *window);
bool event(QEvent *);
@@ -93,7 +93,7 @@ private:
friend class QSGRenderThread;
- void releaseResources(QQuickWindow *window, bool inDestructor);
+ void releaseResources(Window *window, bool inDestructor);
bool checkAndResetForceUpdate(QQuickWindow *window);
bool anyoneShowing() const;
@@ -102,10 +102,10 @@ private:
void startOrStopAnimationTimer();
void maybePostPolishRequest(Window *w);
void waitForReleaseComplete();
- bool polishAndSync(Window *w);
+ void polishAndSync(Window *w, bool inExpose = false);
void maybeUpdate(Window *window);
- void handleExposure(Window *w);
+ void handleExposure(QQuickWindow *w);
void handleObscurity(Window *w);
@@ -116,7 +116,7 @@ private:
int m_animation_timer;
int m_exhaust_delay;
- bool m_locked;
+ bool m_lockedForSync;
};