summaryrefslogtreecommitdiff
path: root/src/citra_qt/debugger/profiler.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-02-05 14:53:25 -0200
committerGravatar Yuri Kunde Schlesner2015-03-01 21:47:13 -0300
commitcd1fbfcf1b70e365d81480ec0f56db19ed02454f (patch)
treeb220b105d1b8016bb258047683bf2d03795c8881 /src/citra_qt/debugger/profiler.h
parentMerge pull request #616 from archshift/5551 (diff)
downloadyuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.gz
yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.xz
yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.zip
Add profiling infrastructure and widget
Diffstat (limited to 'src/citra_qt/debugger/profiler.h')
-rw-r--r--src/citra_qt/debugger/profiler.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/profiler.h b/src/citra_qt/debugger/profiler.h
new file mode 100644
index 000000000..a6d87aa0f
--- /dev/null
+++ b/src/citra_qt/debugger/profiler.h
@@ -0,0 +1,50 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <QAbstractItemModel>
8#include <QDockWidget>
9#include <QTimer>
10#include "ui_profiler.h"
11
12#include "common/profiler_reporting.h"
13
14class ProfilerModel : public QAbstractItemModel
15{
16 Q_OBJECT
17
18public:
19 ProfilerModel(QObject* parent);
20
21 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
22 QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
23 QModelIndex parent(const QModelIndex& child) const override;
24 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
25 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
26 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
27
28public slots:
29 void updateProfilingInfo();
30
31private:
32 Common::Profiling::AggregatedFrameResult results;
33};
34
35class ProfilerWidget : public QDockWidget
36{
37 Q_OBJECT
38
39public:
40 ProfilerWidget(QWidget* parent = 0);
41
42private slots:
43 void setProfilingInfoUpdateEnabled(bool enable);
44
45private:
46 Ui::Profiler ui;
47 ProfilerModel* model;
48
49 QTimer update_timer;
50};