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>
#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();
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();