- added temp hack for perf issue with Metal layer in fullscreen

This commit is contained in:
alexey.lysiuk 2019-03-17 18:20:24 +02:00
parent 97fc3aa9a6
commit be9a43f177

View file

@ -391,6 +391,16 @@ public:
fb->SetMode(fullscreen, vid_hidpi); fb->SetMode(fullscreen, vid_hidpi);
fb->SetSize(fb->GetClientWidth(), fb->GetClientHeight()); fb->SetSize(fb->GetClientWidth(), fb->GetClientHeight());
// This lame hack is a temporary workaround for strange performance issues
// with fullscreen window and Core Animation's Metal layer
// It is somehow related to initial window level and flags
// Toggling fullscreen -> window -> fullscreen mysteriously solves the problem
if (ms_isVulkanEnabled && fullscreen)
{
fb->SetMode(false, vid_hidpi);
fb->SetMode(true, vid_hidpi);
}
return fb; return fb;
} }