mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1138735 - Fallback to software vsync if CVDisplayLink fails to initialize. r=mstange
This commit is contained in:
parent
4f6edc655f
commit
3cccf0671a
@ -549,6 +549,14 @@ already_AddRefed<mozilla::gfx::VsyncSource>
|
||||
gfxPlatformMac::CreateHardwareVsyncSource()
|
||||
{
|
||||
nsRefPtr<VsyncSource> osxVsyncSource = new OSXVsyncSource();
|
||||
VsyncSource::Display& primaryDisplay = osxVsyncSource->GetGlobalDisplay();
|
||||
primaryDisplay.EnableVsync();
|
||||
if (!primaryDisplay.IsVsyncEnabled()) {
|
||||
NS_WARNING("OS X Vsync source not enabled. Falling back to software vsync.\n");
|
||||
return gfxPlatform::CreateHardwareVsyncSource();
|
||||
}
|
||||
|
||||
primaryDisplay.DisableVsync();
|
||||
return osxVsyncSource.forget();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user