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
This commit is contained in:
parent
89fc75d769
commit
8306703a7d
|
@ -215,18 +215,11 @@ void GRenderWindow::moveContext() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GRenderWindow::SwapBuffers() {
|
void GRenderWindow::SwapBuffers() {
|
||||||
// In our multi-threaded QWidget use case we shouldn't need to call `makeCurrent`,
|
|
||||||
// since we never call `doneCurrent` in this thread.
|
|
||||||
// However:
|
|
||||||
// - The Qt debug runtime prints a bogus warning on the console if `makeCurrent` wasn't called
|
|
||||||
// since the last time `swapBuffers` was executed;
|
|
||||||
// - On macOS, if `makeCurrent` isn't called explicitly, resizing the buffer breaks.
|
|
||||||
context->makeCurrent(child);
|
|
||||||
|
|
||||||
context->swapBuffers(child);
|
context->swapBuffers(child);
|
||||||
|
|
||||||
if (!first_frame) {
|
if (!first_frame) {
|
||||||
emit FirstFrameDisplayed();
|
|
||||||
first_frame = true;
|
first_frame = true;
|
||||||
|
emit FirstFrameDisplayed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue