summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-01-06 14:02:47 -0300
committerGravatar ReinUsesLisp2020-01-06 14:02:47 -0300
commit8306703a7d986644ee5282d323953133f14211ba (patch)
tree790b6de79fdd051dd238761de6072f00a684511e
parentMerge pull request #3257 from degasus/no_busy_loops (diff)
downloadyuzu-8306703a7d986644ee5282d323953133f14211ba.tar.gz
yuzu-8306703a7d986644ee5282d323953133f14211ba.tar.xz
yuzu-8306703a7d986644ee5282d323953133f14211ba.zip
yuzu/bootmanager: Remove {glx,wgl}MakeCurrent on SwapBuffers
MakeCurrent is a costly (according to Nsight's profiler it takes a tenth of a millisecond to complete), and we don't have a reason to call it because: - Qt no longer signals a warning if it's not called - yuzu no longer supports macOS
-rw-r--r--src/yuzu/bootmanager.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 07a720494..7490fb718 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -215,18 +215,11 @@ void GRenderWindow::moveContext() {
215} 215}
216 216
217void GRenderWindow::SwapBuffers() { 217void GRenderWindow::SwapBuffers() {
218 // In our multi-threaded QWidget use case we shouldn't need to call `makeCurrent`,
219 // since we never call `doneCurrent` in this thread.
220 // However:
221 // - The Qt debug runtime prints a bogus warning on the console if `makeCurrent` wasn't called
222 // since the last time `swapBuffers` was executed;
223 // - On macOS, if `makeCurrent` isn't called explicitly, resizing the buffer breaks.
224 context->makeCurrent(child);
225
226 context->swapBuffers(child); 218 context->swapBuffers(child);
219
227 if (!first_frame) { 220 if (!first_frame) {
228 emit FirstFrameDisplayed();
229 first_frame = true; 221 first_frame = true;
222 emit FirstFrameDisplayed();
230 } 223 }
231} 224}
232 225