summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/debugger/profiler.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-04-29 09:07:10 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-04-29 09:07:10 +0200
commite3a8292495cf0fb4297be27c696649dc44e011f0 (patch)
treef188b106e2d1b39ed7a87972db9f942e15987375 /src/citra_qt/debugger/profiler.cpp
parentMake Citra build with MICROPROFILE_ENABLED set to 0 (#1709) (diff)
downloadyuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.gz
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.bz2
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.lz
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.xz
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.tar.zst
yuzu-e3a8292495cf0fb4297be27c696649dc44e011f0.zip
Diffstat (limited to 'src/citra_qt/debugger/profiler.cpp')
-rw-r--r--src/citra_qt/debugger/profiler.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/citra_qt/debugger/profiler.cpp b/src/citra_qt/debugger/profiler.cpp
index e90973b8e..7bb010f77 100644
--- a/src/citra_qt/debugger/profiler.cpp
+++ b/src/citra_qt/debugger/profiler.cpp
@@ -9,6 +9,7 @@
#include "citra_qt/debugger/profiler.h"
#include "citra_qt/util/util.h"
+#include "common/common_types.h"
#include "common/microprofile.h"
#include "common/profiler_reporting.h"
@@ -36,21 +37,9 @@ static QVariant GetDataForColumn(int col, const AggregatedDuration& duration)
}
}
-static const TimingCategoryInfo* GetCategoryInfo(int id)
-{
- const auto& categories = GetProfilingManager().GetTimingCategoriesInfo();
- if ((size_t)id >= categories.size()) {
- return nullptr;
- } else {
- return &categories[id];
- }
-}
-
ProfilerModel::ProfilerModel(QObject* parent) : QAbstractItemModel(parent)
{
updateProfilingInfo();
- const auto& categories = GetProfilingManager().GetTimingCategoriesInfo();
- results.time_per_category.resize(categories.size());
}
QVariant ProfilerModel::headerData(int section, Qt::Orientation orientation, int role) const
@@ -87,7 +76,7 @@ int ProfilerModel::rowCount(const QModelIndex& parent) const
if (parent.isValid()) {
return 0;
} else {
- return static_cast<int>(results.time_per_category.size() + 2);
+ return 2;
}
}
@@ -106,17 +95,6 @@ QVariant ProfilerModel::data(const QModelIndex& index, int role) const
} else {
return GetDataForColumn(index.column(), results.interframe_time);
}
- } else {
- if (index.column() == 0) {
- const TimingCategoryInfo* info = GetCategoryInfo(index.row() - 2);
- return info != nullptr ? QString(info->name) : QVariant();
- } else {
- if (index.row() - 2 < (int)results.time_per_category.size()) {
- return GetDataForColumn(index.column(), results.time_per_category[index.row() - 2]);
- } else {
- return QVariant();
- }
- }
}
}