From 8fee64d8d6dd1d33523fa91830304a29a8d89f05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 12 Mar 2013 11:03:51 +0100 Subject: [PATCH] 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 --- src/quick/scenegraph/qsgthreadedrenderloop.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 95409a0..ef50d5a 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); -- 1.7.2.5