summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-30 10:50:54 -0400
committerGravatar Lioncash2018-08-31 07:16:57 -0400
commite2457418dae19b889b2ad85255bb95d4cd0e4bff (patch)
tree76ad194f1cc1933f7907223dbb2542b3614576e5 /src/video_core
parentMerge pull request #1198 from lioncash/kernel (diff)
downloadyuzu-e2457418dae19b889b2ad85255bb95d4cd0e4bff.tar.gz
yuzu-e2457418dae19b889b2ad85255bb95d4cd0e4bff.tar.xz
yuzu-e2457418dae19b889b2ad85255bb95d4cd0e4bff.zip
core: Make the main System class use the PImpl idiom
core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 73d6419b4..3c4a9f17c 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -14,6 +14,7 @@
14#include "core/core_timing.h" 14#include "core/core_timing.h"
15#include "core/frontend/emu_window.h" 15#include "core/frontend/emu_window.h"
16#include "core/memory.h" 16#include "core/memory.h"
17#include "core/perf_stats.h"
17#include "core/settings.h" 18#include "core/settings.h"
18#include "core/tracer/recorder.h" 19#include "core/tracer/recorder.h"
19#include "video_core/renderer_opengl/gl_rasterizer.h" 20#include "video_core/renderer_opengl/gl_rasterizer.h"
@@ -115,7 +116,7 @@ RendererOpenGL::~RendererOpenGL() = default;
115void RendererOpenGL::SwapBuffers(boost::optional<const Tegra::FramebufferConfig&> framebuffer) { 116void RendererOpenGL::SwapBuffers(boost::optional<const Tegra::FramebufferConfig&> framebuffer) {
116 ScopeAcquireGLContext acquire_context{render_window}; 117 ScopeAcquireGLContext acquire_context{render_window};
117 118
118 Core::System::GetInstance().perf_stats.EndSystemFrame(); 119 Core::System::GetInstance().GetPerfStats().EndSystemFrame();
119 120
120 // Maintain the rasterizer's state as a priority 121 // Maintain the rasterizer's state as a priority
121 OpenGLState prev_state = OpenGLState::GetCurState(); 122 OpenGLState prev_state = OpenGLState::GetCurState();
@@ -140,8 +141,8 @@ void RendererOpenGL::SwapBuffers(boost::optional<const Tegra::FramebufferConfig&
140 141
141 render_window.PollEvents(); 142 render_window.PollEvents();
142 143
143 Core::System::GetInstance().frame_limiter.DoFrameLimiting(CoreTiming::GetGlobalTimeUs()); 144 Core::System::GetInstance().FrameLimiter().DoFrameLimiting(CoreTiming::GetGlobalTimeUs());
144 Core::System::GetInstance().perf_stats.BeginSystemFrame(); 145 Core::System::GetInstance().GetPerfStats().BeginSystemFrame();
145 146
146 // Restore the rasterizer state 147 // Restore the rasterizer state
147 prev_state.Apply(); 148 prev_state.Apply();