diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-08-29 12:33:48 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-12 09:54:11 +0200 |
commit | 7d03dfe4192f164e837df2c5652b83ffe04840d6 (patch) | |
tree | 7fc5806755be62bf783fb9c05fb706412940488c /src/quick/scenegraph/qsgadaptationlayer.cpp | |
parent | 22fcb0efbe0644f5bd29e9538ebb76fa0dbc37b3 (diff) |
Use QQuickProfiler's own timer to sample events
Like that the timings are more accurate.
Task-number: QTBUG-39876
Change-Id: Ia6bdce9c8089417e88797ec3a98c8a3e367f73f2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp index faf2762acc..db32f656e1 100644 --- a/src/quick/scenegraph/qsgadaptationlayer.cpp +++ b/src/quick/scenegraph/qsgadaptationlayer.cpp @@ -153,9 +153,10 @@ void QSGDistanceFieldGlyphCache::update() if (m_pendingGlyphs.isEmpty()) return; - bool profileFrames = QSG_LOG_TIME_GLYPH().isDebugEnabled() || QQuickProfiler::enabled; + bool profileFrames = QSG_LOG_TIME_GLYPH().isDebugEnabled(); if (profileFrames) qsg_render_timer.start(); + Q_QUICK_SG_PROFILE_START(QQuickProfiler::SceneGraphAdaptationLayerFrame); QList<QDistanceField> distanceFields; for (int i = 0; i < m_pendingGlyphs.size(); ++i) { @@ -168,6 +169,7 @@ void QSGDistanceFieldGlyphCache::update() int count = m_pendingGlyphs.size(); if (profileFrames) renderTime = qsg_render_timer.nsecsElapsed(); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphAdaptationLayerFrame); m_pendingGlyphs.reset(); @@ -182,10 +184,8 @@ void QSGDistanceFieldGlyphCache::update() int(renderTime / 1000000), int((now - (renderTime / 1000000)))); } - Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphAdaptationLayerFrame, ( - count, - renderTime, - qsg_render_timer.nsecsElapsed() - renderTime)); + Q_QUICK_SG_PROFILE_END_WITH_PAYLOAD(QQuickProfiler::SceneGraphAdaptationLayerFrame, + (qint64)count); } void QSGDistanceFieldGlyphCache::setGlyphsPosition(const QList<GlyphPosition> &glyphs) |