aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickthreadedwindowmanager.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2012-08-17 14:59:19 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-04 18:57:48 +0200
commit3f0ebc440a38bed7f9cd130b3934620d57734241 (patch)
tree355a62b8244d198bbe1ee71a60c90e150bd50641 /src/quick/items/qquickthreadedwindowmanager.cpp
parent5e428bb926e0ad4df8ddd672d38b73f5859cbfd5 (diff)
Remove windowmanager hacks form the incubation controller.
Tie incubation directly to wether animations are running or not. When animations are running, we incubate for a third of a frame only. When animations are not running we incubate whatever is left as the scene is anyway idle. Change-Id: I88c9248e9d7b3b35c99fca52aeb9c681d1b4a306 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickthreadedwindowmanager.cpp')
-rw-r--r--src/quick/items/qquickthreadedwindowmanager.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/quick/items/qquickthreadedwindowmanager.cpp b/src/quick/items/qquickthreadedwindowmanager.cpp
index 1baa72bbd9..d654e3ac77 100644
--- a/src/quick/items/qquickthreadedwindowmanager.cpp
+++ b/src/quick/items/qquickthreadedwindowmanager.cpp
@@ -360,7 +360,6 @@ void QQuickRenderThreadSingleContextWindowManager::run()
#ifdef THREAD_DEBUG
printf(" RenderThread: aquired sync lock...\n");
#endif
- allowMainThreadProcessingFlag = false;
QCoreApplication::postEvent(this, new QEvent(QEvent_Sync));
#ifdef THREAD_DEBUG
@@ -413,7 +412,6 @@ void QQuickRenderThreadSingleContextWindowManager::run()
inSync = false;
// Wake GUI after sync to let it continue animating and event processing.
- allowMainThreadProcessingFlag = true;
wake();
unlock();
#ifdef THREAD_DEBUG
@@ -574,7 +572,7 @@ bool QQuickRenderThreadSingleContextWindowManager::event(QEvent *e)
printf("GUI: Advancing animations...\n");
#endif
- animationDriver->advance();
+ animDriver->advance();
#ifdef THREAD_DEBUG
printf("GUI: Animations advanced...\n");
@@ -589,7 +587,7 @@ bool QQuickRenderThreadSingleContextWindowManager::event(QEvent *e)
#ifdef THREAD_DEBUG
printf("GUI: Animations advanced via timer...\n");
#endif
- animationDriver->advance();
+ animDriver->advance();
}
return QThread::event(e);
@@ -766,7 +764,7 @@ void QQuickRenderThreadSingleContextWindowManager::startRendering()
inSync = false;
lockInGui();
- animationRunning = animationDriver->isRunning();
+ animationRunning = animDriver->isRunning();
start(); // Start the render thread...
wait();
unlockInGui();
@@ -820,7 +818,7 @@ void QQuickRenderThreadSingleContextWindowManager::stopRendering()
#endif
// Activate timer to keep animations running
- if (animationDriver->isRunning())
+ if (animDriver->isRunning())
animationTimer = startTimer(1000/60);
}
@@ -893,14 +891,4 @@ void QQuickRenderThreadSingleContextWindowManager::maybeUpdate(QQuickWindow *)
}
-void QQuickRenderThreadSingleContextWindowManager::wakeup()
-{
- lockInGui();
- isExternalUpdatePending = true;
- if (isRenderBlocked)
- wake();
- unlockInGui();
-}
-
-
QT_END_NAMESPACE