diff options
author | Christiaan Janssen <christiaan.janssen@digia.com> | 2012-10-24 16:09:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-30 13:07:16 +0200 |
commit | 107444f7c479ed6a1a3d2c42b026ebc9c1fe4b29 (patch) | |
tree | 1b2d5de24ac315fc1e57beeb38d0fed141fafab6 /src/qml/debugger/qqmlprofilerservice.cpp | |
parent | 3b0a9b27fec09cdab4cde7bfc41578c8c17a8832 (diff) |
QmlProfiler: Pixmap Cache
Change-Id: Ibc237bb162c24030438b89d54fa8802ee66b080a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/qml/debugger/qqmlprofilerservice.cpp')
-rw-r--r-- | src/qml/debugger/qqmlprofilerservice.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/qml/debugger/qqmlprofilerservice.cpp b/src/qml/debugger/qqmlprofilerservice.cpp index cb85fc0e1f..e016b2fdb5 100644 --- a/src/qml/debugger/qqmlprofilerservice.cpp +++ b/src/qml/debugger/qqmlprofilerservice.cpp @@ -76,6 +76,15 @@ QByteArray QQmlProfilerData::toByteArray() const if (messageType == (int)QQmlProfilerService::Event && detailType == (int)QQmlProfilerService::AnimationFrame) ds << framerate << animationcount; + if (messageType == (int)QQmlProfilerService::PixmapCacheEvent) { + ds << detailData; + switch (detailType) { + case QQmlProfilerService::PixmapSizeKnown: ds << line << column; break; + case QQmlProfilerService::PixmapReferenceCountChanged: ds << animationcount; break; + case QQmlProfilerService::PixmapCacheCountChanged: ds << animationcount; break; + default: break; + } + } return data; } @@ -238,6 +247,30 @@ void QQmlProfilerService::endRange(RangeType range) processMessage(rd); } +void QQmlProfilerService::pixmapEventImpl(PixmapEventType eventType, const QUrl &url) +{ + // assuming enabled checked by caller + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)PixmapCacheEvent, (int)eventType, + url.toString(), -1, -1, -1, -1, -1}; + processMessage(rd); +} + +void QQmlProfilerService::pixmapEventImpl(PixmapEventType eventType, const QUrl &url, int width, int height) +{ + // assuming enabled checked by caller + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)PixmapCacheEvent, (int)eventType, + url.toString(), width, height, -1, -1, -1}; + processMessage(rd); +} + +void QQmlProfilerService::pixmapEventImpl(PixmapEventType eventType, const QUrl &url, int count) +{ + // assuming enabled checked by caller + QQmlProfilerData rd = {m_timer.nsecsElapsed(), (int)PixmapCacheEvent, (int)eventType, + url.toString(), -1, -1, -1, count, -1}; + processMessage(rd); +} + void QQmlProfilerService::animationFrameImpl(qint64 delta) { Q_ASSERT(QQmlDebugService::isDebuggingEnabled()); |