Add performance statistics to status bar

This commit is contained in:
Yuri Kunde Schlesner 2017-02-19 14:34:47 -08:00
parent 21f4f49c7a
commit c75ae6c585
11 changed files with 159 additions and 3 deletions

View file

@ -12,6 +12,7 @@
#include "common/logging/log.h"
#include "common/profiler_reporting.h"
#include "common/synchronized_wrapper.h"
#include "core/core.h"
#include "core/frontend/emu_window.h"
#include "core/hw/gpu.h"
#include "core/hw/hw.h"
@ -151,6 +152,10 @@ void RendererOpenGL::SwapBuffers() {
auto aggregator = Common::Profiling::GetTimingResultsAggregator();
aggregator->AddFrame(profiler.GetPreviousFrameResults());
}
{
auto perf_stats = Core::System::GetInstance().perf_stats.Lock();
perf_stats->EndSystemFrame();
}
// Swap buffers
render_window->PollEvents();
@ -159,6 +164,10 @@ void RendererOpenGL::SwapBuffers() {
prev_state.Apply();
profiler.BeginFrame();
{
auto perf_stats = Core::System::GetInstance().perf_stats.Lock();
perf_stats->BeginSystemFrame();
}
RefreshRasterizerSetting();