improved FPS counter

Shows real frame update time rather than refresh time
This commit is contained in:
itsmattkc
2021-03-15 11:34:09 +11:00
parent 056a1202d6
commit a30d031a9c
3 changed files with 46 additions and 22 deletions
+5 -3
View File
@@ -428,9 +428,12 @@ void ViewerWidget::UpdateTextureFromNode(const rational& time)
PopOldestFrameFromPlaybackQueue();
if (popped) {
// We've already popped a frame in this loop, meaning a frame has been skipped
display_widget_->SetSkippedFrames(display_widget_->GetSkippedFrames()+1);
display_widget_->IncrementSkippedFrames();
} else {
// Shown a frame and progressed to the next one
display_widget_->IncrementFrameCount();
popped = true;
}
popped = true;
}
}
@@ -492,7 +495,6 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only)
playback_speed_ = speed;
play_in_to_out_only_ = in_to_out_only;
display_widget_->SetSkippedFrames(0);
playback_queue_next_frame_ = ruler()->GetTime();