mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Merge pull request #9302 from jherico/expose_dropped_count
Expose dropped frames count to stats UI
This commit is contained in:
commit
f9ca41e89c
3 changed files with 9 additions and 0 deletions
|
@ -79,6 +79,10 @@ Item {
|
|||
StatText {
|
||||
text: "Avatar Simrate: " + root.avatarSimrate
|
||||
}
|
||||
StatText {
|
||||
text: "Missed Frame Count: " + root.appdropped;
|
||||
visible: root.appdropped > 0;
|
||||
}
|
||||
StatText {
|
||||
text: "Packets In/Out: " + root.packetInCount + "/" + root.packetOutCount
|
||||
}
|
||||
|
|
|
@ -125,6 +125,8 @@ void Stats::updateStats(bool force) {
|
|||
STAT_UPDATE(framerate, qApp->getFps());
|
||||
if (qApp->getActiveDisplayPlugin()) {
|
||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||
auto stats = displayPlugin->getHardwareStats();
|
||||
STAT_UPDATE(appdropped, stats["app_dropped_frame_count"].toInt());
|
||||
STAT_UPDATE(renderrate, displayPlugin->renderRate());
|
||||
STAT_UPDATE(presentrate, displayPlugin->presentRate());
|
||||
STAT_UPDATE(presentnewrate, displayPlugin->newFramePresentRate());
|
||||
|
|
|
@ -39,6 +39,8 @@ class Stats : public QQuickItem {
|
|||
// How often the display device reprojecting old frames
|
||||
STATS_PROPERTY(float, stutterrate, 0)
|
||||
|
||||
STATS_PROPERTY(int, appdropped, 0)
|
||||
|
||||
STATS_PROPERTY(float, presentnewrate, 0)
|
||||
STATS_PROPERTY(float, presentdroprate, 0)
|
||||
STATS_PROPERTY(int, simrate, 0)
|
||||
|
@ -135,6 +137,7 @@ public slots:
|
|||
void forceUpdateStats() { updateStats(true); }
|
||||
|
||||
signals:
|
||||
void appdroppedChanged();
|
||||
void framerateChanged();
|
||||
void expandedChanged();
|
||||
void timingExpandedChanged();
|
||||
|
|
Loading…
Reference in a new issue