aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-09-07 15:12:47 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-10 14:24:05 +0200
commit6063413330def9af3ef16a7a3a373284a15dddca (patch)
tree42a656f7bccc04240713192d718fe4b141d6798b /src
parent7f9656d9ec987a8b525a265d1d89e03eb496de7c (diff)
Fix calculation of QML_RENDER_TIMING values
The sync time was not taken into account Change-Id: I3d8adb637572c72438e20729a80513850a80d17e Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Alan Alpert <416365416c@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickthreadedwindowmanager.cpp4
-rw-r--r--src/quick/items/qquickwindowmanager.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/items/qquickthreadedwindowmanager.cpp b/src/quick/items/qquickthreadedwindowmanager.cpp
index 653192b1cc..04c698c367 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 d864d72125..4b36d9e491 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();