Add profiling infrastructure and widget

This commit is contained in:
Yuri Kunde Schlesner 2015-02-05 14:53:25 -02:00
parent c1d29ac202
commit cd1fbfcf1b
16 changed files with 757 additions and 0 deletions

View file

@ -4,7 +4,10 @@
#include "core/hw/gpu.h"
#include "core/mem_map.h"
#include "common/emu_window.h"
#include "common/profiler_reporting.h"
#include "video_core/video_core.h"
#include "video_core/renderer_opengl/renderer_opengl.h"
#include "video_core/renderer_opengl/gl_shader_util.h"
@ -75,9 +78,18 @@ void RendererOpenGL::SwapBuffers() {
DrawScreens();
auto& profiler = Common::Profiling::GetProfilingManager();
profiler.FinishFrame();
{
auto aggregator = Common::Profiling::GetTimingResultsAggregator();
aggregator->AddFrame(profiler.GetPreviousFrameResults());
}
// Swap buffers
render_window->PollEvents();
render_window->SwapBuffers();
profiler.BeginFrame();
}
/**