aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmlprofilerservice_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2013-12-06 13:57:36 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-09 09:51:16 +0100
commit3297ccddf5f5234de5691f073507a5d88ccfeb04 (patch)
tree9af4578e054f6e11da3ecafcdc217402a7eae2bd /src/qml/debugger/qqmlprofilerservice_p.h
parent9b6e686ed793c556983f4e835134bdff07f09e42 (diff)
Correctly profile the size of loaded pixmaps
Only set the sizes when they're known, prefer request size to implicit size (as the request size is what ends up in the cache), and don't set the size twice. Task-number: QTBUG-35337 Change-Id: Ie516a1cae2d9050f61362ee99cf8a6a9dd8ea3bb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/qml/debugger/qqmlprofilerservice_p.h')
-rw-r--r--src/qml/debugger/qqmlprofilerservice_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/debugger/qqmlprofilerservice_p.h b/src/qml/debugger/qqmlprofilerservice_p.h
index c2e9eb421a..5959a526bb 100644
--- a/src/qml/debugger/qqmlprofilerservice_p.h
+++ b/src/qml/debugger/qqmlprofilerservice_p.h
@@ -381,9 +381,9 @@ struct QQmlPixmapProfiler {
QQmlProfilerService::instance->pixmapEventImpl(QQmlProfilerService::PixmapReferenceCountChanged, pixmapUrl, referenceCount);
}
}
- void setSize(const QUrl &pixmapUrl, int width, int height) {
- if (enabled) {
- QQmlProfilerService::instance->pixmapEventImpl(QQmlProfilerService::PixmapSizeKnown, pixmapUrl, width, height);
+ void setSize(const QUrl &pixmapUrl, const QSize &size) {
+ if (enabled && size.width() > 0) {
+ QQmlProfilerService::instance->pixmapEventImpl(QQmlProfilerService::PixmapSizeKnown, pixmapUrl, size.width(), size.height());
}
}