diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2014-11-18 18:32:43 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2014-12-12 11:01:51 +0100 |
commit | ef064154a4c29cd95af9007b9ab22493a7da1b37 (patch) | |
tree | 42d8fa71c40b85eba5bd211003abdc02261c1de6 /src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp | |
parent | 62d21d123c9b0ed700bf252020554741df33eee5 (diff) | |
download | qt-creator-ef064154a4c29cd95af9007b9ab22493a7da1b37.tar.gz |
QMLProfiler: Use scene graph for painting events in timeline
By using the scene graph we can retain the geometry for events in
the timeline on the GPU and potentially speed up the rendering for
large amounts of items.
Change-Id: I2cfbb8ef4ebc7b56f1977ec1facb4f2e7f2002ee
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp index d945fe5186..bb0bd8dac1 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp @@ -31,6 +31,10 @@ #include "qmlprofilerrangemodel.h" #include "qmlprofilermodelmanager.h" #include "qmlprofilerdatamodel.h" +#include "qmlprofilerbindingloopsrenderpass.h" +#include "timelinenotesrenderpass.h" +#include "timelineitemsrenderpass.h" +#include "timelineselectionrenderpass.h" #include <QCoreApplication> #include <QVector> @@ -61,6 +65,11 @@ void QmlProfilerRangeModel::clear() QmlProfilerTimelineModel::clear(); } +bool QmlProfilerRangeModel::supportsBindingLoops() const +{ + return rangeType() == QmlDebug::Binding || rangeType() == QmlDebug::HandlingSignal; +} + void QmlProfilerRangeModel::loadData() { clear(); @@ -97,7 +106,8 @@ void QmlProfilerRangeModel::loadData() updateProgress(4, 6); - findBindingLoops(); + if (supportsBindingLoops()) + findBindingLoops(); updateProgress(5, 6); @@ -152,9 +162,6 @@ void QmlProfilerRangeModel::computeExpandedLevels() void QmlProfilerRangeModel::findBindingLoops() { - if (rangeType() != QmlDebug::Binding && rangeType() != QmlDebug::HandlingSignal) - return; - typedef QPair<int, int> CallStackEntry; QStack<CallStackEntry> callStack; @@ -277,7 +284,20 @@ int QmlProfilerRangeModel::selectionIdForLocation(const QString &filename, int l return -1; } +QList<const TimelineRenderPass *> QmlProfilerRangeModel::supportedRenderPasses() const +{ + if (supportsBindingLoops()) { + QList<const TimelineRenderPass *> passes; + passes << TimelineItemsRenderPass::instance() + << QmlProfilerBindingLoopsRenderPass::instance() + << TimelineSelectionRenderPass::instance() + << TimelineNotesRenderPass::instance(); + return passes; + } else { + return QmlProfilerTimelineModel::supportedRenderPasses(); + } +} } } |