Core: Make PerfStats internally locked

More ergonomic to use and will be required for upcoming changes.
This commit is contained in:
Yuri Kunde Schlesner
2017-02-20 13:56:58 -08:00
parent 8900e0c81b
commit fac1bfea42
7 changed files with 25 additions and 16 deletions
@@ -145,10 +145,7 @@ void RendererOpenGL::SwapBuffers() {
DrawScreens();
{
auto perf_stats = Core::System::GetInstance().perf_stats.Lock();
perf_stats->EndSystemFrame();
}
Core::System::GetInstance().perf_stats.EndSystemFrame();
// Swap buffers
render_window->PollEvents();
@@ -156,10 +153,7 @@ void RendererOpenGL::SwapBuffers() {
prev_state.Apply();
{
auto perf_stats = Core::System::GetInstance().perf_stats.Lock();
perf_stats->BeginSystemFrame();
}
Core::System::GetInstance().perf_stats.BeginSystemFrame();
RefreshRasterizerSetting();