diff options
author | Christiaan Janssen <christiaan.janssen@digia.com> | 2013-04-17 16:46:12 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-06 14:19:15 +0200 |
commit | 49ef011e33b9ef977679b3d30f883fccea0d8748 (patch) | |
tree | 96a17090cc17ab04796094a10809274e7a1f3944 /src/quick/scenegraph/qsgcontext.cpp | |
parent | f314fd4327167dd6af88f9b7050b34144d75241d (diff) |
QmlProfiler: SceneGraph profiling
Change-Id: Ide71b330b13fc3816ed191bd9af84e0fce0d9587
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgcontext.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index 5d894e5236..14f0fabbdd 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -67,6 +67,8 @@ #include <private/qobject_p.h> #include <qmutex.h> +#include <private/qqmlprofilerservice_p.h> + DEFINE_BOOL_CONFIG_OPTION(qmlFlashMode, QML_FLASH_MODE) DEFINE_BOOL_CONFIG_OPTION(qmlTranslucentMode, QML_TRANSLUCENT_MODE) DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) @@ -482,7 +484,7 @@ QSGMaterialShader *QSGContext::prepareMaterial(QSGMaterial *material) return shader; #ifndef QSG_NO_RENDER_TIMING - if (qsg_render_timing) + if (qsg_render_timing || QQmlProfilerService::enabled) qsg_renderer_timer.start(); #endif @@ -494,6 +496,12 @@ QSGMaterialShader *QSGContext::prepareMaterial(QSGMaterial *material) #ifndef QSG_NO_RENDER_TIMING if (qsg_render_timing) printf(" - compiling material: %dms\n", (int) qsg_renderer_timer.elapsed()); + + if (QQmlProfilerService::enabled) { + QQmlProfilerService::sceneGraphFrame( + QQmlProfilerService::SceneGraphContextFrame, + qsg_renderer_timer.nsecsElapsed()); + } #endif return shader; |