SceneGraphPolishAndSync,
SceneGraphWindowsRenderShow,
SceneGraphWindowsAnimations,
- SceneGraphWindowsPolishFrame,
+ SceneGraphPolishFrame,
MaximumSceneGraphFrameType
};
qCDebug(QSG_LOG_TIME_COMPILATION, "shader compiled in %dms", (int) qsg_renderer_timer.elapsed());
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphContextFrame, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphContextFrame, (
qsg_renderer_timer.nsecsElapsed()));
rewrittenShaders[type] = shader;
qCDebug(QSG_LOG_TIME_COMPILATION, "shader compiled in %dms (no rewrite)", (int) qsg_renderer_timer.elapsed());
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphContextFrame, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphContextFrame, (
qsg_renderer_timer.nsecsElapsed()));
return shader;
}
int((bindTime - updatePassTime) / 1000000),
int((renderTime - bindTime) / 1000000));
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphRendererFrame, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphRendererFrame, (
preprocessTime,
updatePassTime - preprocessTime,
bindTime - updatePassTime,
int(renderTime / 1000000),
int((now - (renderTime / 1000000))));
}
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphAdaptationLayerFrame, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphAdaptationLayerFrame, (
count,
renderTime,
qsg_render_timer.nsecsElapsed() - renderTime));
cd->polishItems();
- if (profileFrames)
+ if (profileFrames) {
polishTime = renderTimer.nsecsElapsed();
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphPolishFrame, (polishTime));
+ }
emit window->afterAnimating();
lastFrameTime = QTime::currentTime();
}
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphRenderLoopFrame, (
- syncTime,
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphRenderLoopFrame, (
+ syncTime - polishTime,
renderTime - syncTime,
swapTime));
int(threadTimer.elapsed() - renderTime / 1000000));
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphRenderLoopFrame, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphRenderLoopFrame, (
syncTime,
renderTime - syncTime,
threadTimer.nsecsElapsed() - renderTime));
<< ", animations=" << (timer.nsecsElapsed() - syncTime) / 1000000
<< " - (on Gui thread) " << window;
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphPolishAndSync, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphPolishAndSync, (
polishTime,
waitTime - polishTime,
syncTime - waitTime,
"animations ticked in %dms",
int((qsg_render_timer.nsecsElapsed() - time_start)/1000000));
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphWindowsAnimations, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphWindowsAnimations, (
qsg_render_timer.nsecsElapsed() - time_start));
// It is not given that animations triggered another maybeUpdate()
d->polishItems();
QSG_RENDER_TIMING_SAMPLE(time_polished);
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphPolishFrame, (time_polished - time_start));
+
emit window->afterAnimating();
RLDEBUG(" - syncing");
<< ", swap=" << (time_swapped - time_rendered) / 1000000
<< " - " << window;
- Q_QUICK_SG_PROFILE2(QQuickProfiler::SceneGraphWindowsPolishFrame,
- QQuickProfiler::SceneGraphRenderLoopFrame, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphRenderLoopFrame, (
time_synced - time_polished,
time_rendered - time_synced,
- time_swapped - time_rendered,
- time_polished - time_start));
+ time_swapped - time_rendered));
}
QT_END_NAMESPACE
<< "ms (" << m_pending_uploads.at(i)->image().width() << "x"
<< m_pending_uploads.at(i)->image().height() << ")";
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphTexturePrepare, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphTexturePrepare, (
0, // bind (not relevant)
0, // convert (not relevant)
0, // swizzle (not relevant)
(int) qsg_renderer_timer.elapsed(),
m_texture_size.width(),
m_texture_size.height());
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphTextureDeletion, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphTextureDeletion, (
qsg_renderer_timer.nsecsElapsed()));
}
m_texture_id = 0;
int((mipmapTime - uploadTime)/1000000));
}
- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphTexturePrepare, (
+ Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphTexturePrepare, (
bindTime,
convertTime - bindTime,
swizzleTime - convertTime,
case QQuickProfiler::SceneGraphWindowsRenderShow: ds << subtime_1 << subtime_2 << subtime_3; break;
// WindowsAnimations: update time
case QQuickProfiler::SceneGraphWindowsAnimations: ds << subtime_1; break;
- // WindowsRenderWindow: polish time; always comes packed after a RenderLoop
- case QQuickProfiler::SceneGraphWindowsPolishFrame: ds << subtime_4; break;
+ // non-threaded rendering: polish time
+ case QQuickProfiler::SceneGraphPolishFrame: ds << subtime_1; break;
default:break;
}
break;
#define Q_QUICK_PROFILE(Method)\
Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::Method)
-#define Q_QUICK_SG_PROFILE2(Type1, Type2, Params)\
- Q_QUICK_PROFILE_IF_ENABLED((QQuickProfiler::sceneGraphFrame<Type1, Type2> Params))
-
-#define Q_QUICK_SG_PROFILE1(Type, Params) Q_QUICK_SG_PROFILE2(Type, Type, Params)
+#define Q_QUICK_SG_PROFILE(Type, Params)\
+ Q_QUICK_PROFILE_IF_ENABLED((QQuickProfiler::sceneGraphFrame<Type> Params))
// This struct is somewhat dangerous to use:
}
}
- template<SceneGraphFrameType FrameType1, SceneGraphFrameType FrameType2>
+ template<SceneGraphFrameType FrameType>
static void sceneGraphFrame(qint64 value1, qint64 value2 = -1, qint64 value3 = -1,
qint64 value4 = -1, qint64 value5 = -1)
{
s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), 1 << SceneGraphFrame,
- 1 << FrameType1 | 1 << FrameType2, value1, value2, value3, value4, value5));
+ 1 << FrameType, value1, value2, value3, value4, value5));
}
template<PixmapEventType PixmapState>