diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-27 05:21:28 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-27 05:21:28 (GMT) |
commit | f1603f8a4bd3027be201920fa99c9370264bee03 (patch) | |
tree | 802dc659bf52592e6da581d02b11c45896bfa986 /src/declarative/qml/qdeclarativecomponent.cpp | |
parent | 5a6a5b1b83e2196b4cad11fbb0f175682b6f7e8e (diff) | |
download | Qt-f1603f8a4bd3027be201920fa99c9370264bee03.zip Qt-f1603f8a4bd3027be201920fa99c9370264bee03.tar.gz Qt-f1603f8a4bd3027be201920fa99c9370264bee03.tar.bz2 |
Improve QML framerate debugging
Diffstat (limited to 'src/declarative/qml/qdeclarativecomponent.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 7aa17e8..2dc2d2d 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -53,6 +53,7 @@ #include "private/qdeclarativebinding_p_p.h" #include "private/qdeclarativeglobal_p.h" #include "private/qdeclarativescriptparser_p.h" +#include "private/qdeclarativedebugtiming_p.h" #include <QStack> #include <QStringList> @@ -693,6 +694,10 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + bool isRoot = !ep->inBeginCreate; + if (isRoot) + QDeclarativeDebugTiming::startRange(QDeclarativeDebugTiming::Creating); + QDeclarativeContextData *ctxt = new QDeclarativeContextData; ctxt->isInternal = true; ctxt->url = cc->url; @@ -839,6 +844,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri enginePriv->erroredBindings->removeError(); } } + } } @@ -860,6 +866,8 @@ void QDeclarativeComponentPrivate::completeCreate() if (state.completePending) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); complete(ep, &state); + + QDeclarativeDebugTiming::endRange(QDeclarativeDebugTiming::Creating); } } |