summaryrefslogtreecommitdiff
path: root/src/core/hle
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/core/hle
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/core/hle')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp3
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index 8bc49935a..0b37098e1 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -7,6 +7,7 @@
7#include "core/core.h" 7#include "core/core.h"
8#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" 8#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
9#include "core/hle/service/nvdrv/devices/nvmap.h" 9#include "core/hle/service/nvdrv/devices/nvmap.h"
10#include "core/perf_stats.h"
10#include "video_core/gpu.h" 11#include "video_core/gpu.h"
11#include "video_core/renderer_base.h" 12#include "video_core/renderer_base.h"
12 13
@@ -31,7 +32,7 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3
31 transform, crop_rect}; 32 transform, crop_rect};
32 33
33 auto& instance = Core::System::GetInstance(); 34 auto& instance = Core::System::GetInstance();
34 instance.perf_stats.EndGameFrame(); 35 instance.GetPerfStats().EndGameFrame();
35 instance.Renderer().SwapBuffers(framebuffer); 36 instance.Renderer().SwapBuffers(framebuffer);
36} 37}
37 38
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 3996c24fe..06040da6f 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -17,6 +17,7 @@
17#include "core/hle/service/nvdrv/nvdrv.h" 17#include "core/hle/service/nvdrv/nvdrv.h"
18#include "core/hle/service/nvflinger/buffer_queue.h" 18#include "core/hle/service/nvflinger/buffer_queue.h"
19#include "core/hle/service/nvflinger/nvflinger.h" 19#include "core/hle/service/nvflinger/nvflinger.h"
20#include "core/perf_stats.h"
20#include "video_core/renderer_base.h" 21#include "video_core/renderer_base.h"
21#include "video_core/video_core.h" 22#include "video_core/video_core.h"
22 23
@@ -137,7 +138,7 @@ void NVFlinger::Compose() {
137 auto& system_instance = Core::System::GetInstance(); 138 auto& system_instance = Core::System::GetInstance();
138 139
139 // There was no queued buffer to draw, render previous frame 140 // There was no queued buffer to draw, render previous frame
140 system_instance.perf_stats.EndGameFrame(); 141 system_instance.GetPerfStats().EndGameFrame();
141 system_instance.Renderer().SwapBuffers({}); 142 system_instance.Renderer().SwapBuffers({});
142 continue; 143 continue;
143 } 144 }