From: Thomas McGuire Date: Fri, 7 Sep 2012 13:12:47 +0000 (+0200) Subject: Fix calculation of QML_RENDER_TIMING values X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6063413330def9af3ef16a7a3a373284a15dddca;p=profile%2Fivi%2Fqtdeclarative.git Fix calculation of QML_RENDER_TIMING values The sync time was not taken into account Change-Id: I3d8adb637572c72438e20729a80513850a80d17e Reviewed-by: Sean Harmer Reviewed-by: Alan Alpert <416365416c@gmail.com> --- diff --git a/src/quick/items/qquickthreadedwindowmanager.cpp b/src/quick/items/qquickthreadedwindowmanager.cpp index 653192b..04c698c 100644 --- a/src/quick/items/qquickthreadedwindowmanager.cpp +++ b/src/quick/items/qquickthreadedwindowmanager.cpp @@ -477,10 +477,10 @@ void QQuickRenderThreadSingleContextWindowManager::run() #ifdef QQUICK_RENDER_TIMING if (qquick_render_timing()) { static QTime lastFrameTime = QTime::currentTime(); - swapTime = threadTimer.elapsed() - renderTime; + swapTime = threadTimer.elapsed() - renderTime - syncTime; qDebug() << "- Breakdown of frame time; sync:" << syncTime << "ms render:" << renderTime << "ms swap:" << swapTime - << "ms total:" << swapTime + renderTime + << "ms total:" << swapTime + renderTime + syncTime << "ms time since last frame:" << (lastFrameTime.msecsTo(QTime::currentTime())) << "ms"; lastFrameTime = QTime::currentTime(); diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp index d864d72..4b36d9e 100644 --- a/src/quick/items/qquickwindowmanager.cpp +++ b/src/quick/items/qquickwindowmanager.cpp @@ -262,10 +262,10 @@ void QQuickTrivialWindowManager::renderWindow(QQuickWindow *window) if (qquick_render_timing()) { static QTime lastFrameTime = QTime::currentTime(); - const int swapTime = renderTimer.elapsed() - renderTime; + const int swapTime = renderTimer.elapsed() - renderTime - syncTime; qDebug() << "- Breakdown of frame time; sync:" << syncTime << "ms render:" << renderTime << "ms swap:" << swapTime - << "ms total:" << swapTime + renderTime + << "ms total:" << swapTime + renderTime + syncTime << "ms time since last frame:" << (lastFrameTime.msecsTo(QTime::currentTime())) << "ms"; lastFrameTime = QTime::currentTime();