diff options
-rw-r--r-- | src/qml/debugger/qqmlprofilerdefinitions_p.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgrenderer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 8 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgwindowsrenderloop.cpp | 10 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgatlastexture.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgtexture.cpp | 4 | ||||
-rw-r--r-- | src/quick/util/qquickprofiler.cpp | 4 | ||||
-rw-r--r-- | src/quick/util/qquickprofiler_p.h | 10 |
11 files changed, 26 insertions, 26 deletions
diff --git a/src/qml/debugger/qqmlprofilerdefinitions_p.h b/src/qml/debugger/qqmlprofilerdefinitions_p.h index 177b1ae8c4..689a06a0d1 100644 --- a/src/qml/debugger/qqmlprofilerdefinitions_p.h +++ b/src/qml/debugger/qqmlprofilerdefinitions_p.h @@ -123,7 +123,7 @@ struct QQmlProfilerDefinitions { SceneGraphPolishAndSync, SceneGraphWindowsRenderShow, SceneGraphWindowsAnimations, - SceneGraphWindowsPolishFrame, + SceneGraphPolishFrame, MaximumSceneGraphFrameType }; diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index c064023010..3770461ba7 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -162,7 +162,7 @@ ShaderManager::Shader *ShaderManager::prepareMaterial(QSGMaterial *material) 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; @@ -193,7 +193,7 @@ 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_PROFILE1(QQuickProfiler::SceneGraphContextFrame, ( + Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphContextFrame, ( qsg_renderer_timer.nsecsElapsed())); return shader; } diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp index d64bd4e14a..2980cea7b2 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp @@ -276,7 +276,7 @@ void QSGRenderer::renderScene(const QSGBindable &bindable) 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, diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp index 0ac5f237e0..9826fa8978 100644 --- a/src/quick/scenegraph/qsgadaptationlayer.cpp +++ b/src/quick/scenegraph/qsgadaptationlayer.cpp @@ -190,7 +190,7 @@ void QSGDistanceFieldGlyphCache::update() 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)); diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index fba2114d47..b4b4a6e1bf 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -367,8 +367,10 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) cd->polishItems(); - if (profileFrames) + if (profileFrames) { polishTime = renderTimer.nsecsElapsed(); + Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphPolishFrame, (polishTime)); + } emit window->afterAnimating(); @@ -409,8 +411,8 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) lastFrameTime = QTime::currentTime(); } - Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphRenderLoopFrame, ( - syncTime, + Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphRenderLoopFrame, ( + syncTime - polishTime, renderTime - syncTime, swapTime)); diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 106819e86e..584098cc89 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -605,7 +605,7 @@ void QSGRenderThread::syncAndRender() int(threadTimer.elapsed() - renderTime / 1000000)); - Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphRenderLoopFrame, ( + Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphRenderLoopFrame, ( syncTime, renderTime - syncTime, threadTimer.nsecsElapsed() - renderTime)); @@ -1141,7 +1141,7 @@ void QSGThreadedRenderLoop::polishAndSync(Window *w, bool inExpose) << ", 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, diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp index 5961c96319..70f80689f5 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp +++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp @@ -376,7 +376,7 @@ void QSGWindowsRenderLoop::render() "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() @@ -418,6 +418,8 @@ void QSGWindowsRenderLoop::renderWindow(QQuickWindow *window) d->polishItems(); QSG_RENDER_TIMING_SAMPLE(time_polished); + Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphPolishFrame, (time_polished - time_start)); + emit window->afterAnimating(); RLDEBUG(" - syncing"); @@ -443,12 +445,10 @@ void QSGWindowsRenderLoop::renderWindow(QQuickWindow *window) << ", 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 diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index fcd10ee577..f7cf97954a 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -399,7 +399,7 @@ void Atlas::bind(QSGTexture::Filtering filtering) << "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) diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index 995bfc183a..120a3ebf3d 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -625,7 +625,7 @@ void QSGPlainTexture::bind() (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; @@ -726,7 +726,7 @@ void QSGPlainTexture::bind() int((mipmapTime - uploadTime)/1000000)); } - Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphTexturePrepare, ( + Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphTexturePrepare, ( bindTime, convertTime - bindTime, swizzleTime - convertTime, diff --git a/src/quick/util/qquickprofiler.cpp b/src/quick/util/qquickprofiler.cpp index 3e2a078fb9..3fd9b15f08 100644 --- a/src/quick/util/qquickprofiler.cpp +++ b/src/quick/util/qquickprofiler.cpp @@ -103,8 +103,8 @@ void QQuickProfilerData::toByteArrays(QList<QByteArray> &messages) const 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; diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h index 03cef951b5..d5927a1f1f 100644 --- a/src/quick/util/qquickprofiler_p.h +++ b/src/quick/util/qquickprofiler_p.h @@ -71,10 +71,8 @@ QT_BEGIN_NAMESPACE #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: @@ -170,12 +168,12 @@ public: } } - 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> |