diff options
author | Glenn Watson <glenn.watson@nokia.com> | 2012-05-15 11:57:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-15 05:30:26 +0200 |
commit | e0eec47cac3f9f06613011dd70db74b7cd7d61ef (patch) | |
tree | a7def7294cf3d32493ba79f25b182889ea51bfd8 /src/quick/items/qquickcanvas.cpp | |
parent | fec5068733373750d3a913fe3e6b3464a3f7275b (diff) |
Add hooks for declarative memory profiler.
These macros effectively do nothing if the profiling library has not
been preloaded. However, if the library is loaded they provide some
additional context for each heap allocation, by tagging each
subsequent allocation with the QML file that caused the allocation
to occur.
Change-Id: Ib1f56d0df0664e118e04e53e22a6942317b1baed
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r-- | src/quick/items/qquickcanvas.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index 6de38da3e7..4fd3bf0e87 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -68,6 +68,7 @@ #include <QtQuick/private/qquickpixmapcache_p.h> #include <private/qqmlprofilerservice_p.h> +#include <private/qqmlmemoryprofiler_p.h> QT_BEGIN_NAMESPACE @@ -267,6 +268,7 @@ void forceUpdate(QQuickItem *item) void QQuickCanvasPrivate::syncSceneGraph() { + QML_MEMORY_SCOPE_STRING("SceneGraph"); if (!renderer) { forceUpdate(rootItem); @@ -289,6 +291,7 @@ void QQuickCanvasPrivate::syncSceneGraph() void QQuickCanvasPrivate::renderSceneGraph(const QSize &size) { + QML_MEMORY_SCOPE_STRING("SceneGraph"); Q_Q(QQuickCanvas); emit q->beforeRendering(); int fboId = 0; |