aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@digia.com>2013-03-12 11:03:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 20:00:46 +0100
commit8fee64d8d6dd1d33523fa91830304a29a8d89f05 (patch)
tree3de9099de2dc86e42f6fb0d26e3db4e0b139a9ab
parentddb4935823e9682cbe9fa03869ee5d1771c15feb (diff)
Polish usage of a QElapsedTime instance in QSGThreadedRenderLoop
The patch should make valgrind happy, by not using an uninitialized memory. Change-Id: Iec7f16c56f250dd121a37f03da4cfc5d9e5c0742 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index 95409a04f7..ef50d5a89d 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -969,6 +969,7 @@ void QSGThreadedRenderLoop::polishAndSync()
QElapsedTimer timer;
int polishTime = 0;
int waitTime = 0;
+ int syncTime;
if (qquick_window_timing)
timer.start();
#endif
@@ -1002,7 +1003,8 @@ void QSGThreadedRenderLoop::polishAndSync()
RLDEBUG("GUI: - unlocked after sync...");
#ifndef QSG_NO_WINDOW_TIMING
- int syncTime = timer.elapsed();
+ if (qquick_window_timing)
+ syncTime = timer.elapsed();
#endif
killTimer(m_update_timer);