diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-24 11:50:45 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-24 14:31:11 +0000 |
commit | 2837f1c868b92e7cc8293064ff7ec3f76cdf6c7b (patch) | |
tree | d85fc417fd3e9773cf745e74b2b9d66785be5799 /src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | |
parent | c712f638a0a3ad2a71a9a18601fd320dabd50f16 (diff) |
QmlProfiler: Explicitly specify the offsets for scene graph events
The profiler can be switched on in the middle of a frame. In that case
the last offset into the timing data would be some random number, which
may lead to a crash when recording the sample.
However, as we know all the data points we are going to record, we can
as well specify where they are supposed to go. The timings themselves
may still be random for frames of which we only recorded parts, but
the clients can deal with this.
Task-number: QTBUG-57304
Change-Id: I1d507f2591516e43d5b3cd25f7939716f2b64ed9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 525d702a76..45fb857fb3 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -163,7 +163,8 @@ ShaderManager::Shader *ShaderManager::prepareMaterial(QSGMaterial *material) qCDebug(QSG_LOG_TIME_COMPILATION, "shader compiled in %dms", (int) qsg_renderer_timer.elapsed()); - Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphContextFrame); + Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphContextFrame, + QQuickProfiler::SceneGraphContextMaterialCompile); rewrittenShaders[type] = shader; return shader; @@ -194,7 +195,8 @@ ShaderManager::Shader *ShaderManager::prepareMaterialNoRewrite(QSGMaterial *mate qCDebug(QSG_LOG_TIME_COMPILATION, "shader compiled in %dms (no rewrite)", (int) qsg_renderer_timer.elapsed()); - Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphContextFrame); + Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphContextFrame, + QQuickProfiler::SceneGraphContextMaterialCompile); return shader; } |