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 f273959205
commit b285c2a4ed
7 changed files with 25 additions and 16 deletions

View file

@ -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();