mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1288193 - Ensure that the content process receives the presentation status of a VRDisplay immediately after adding or removing layers r=gw280
- Corrects issues with the onvrdisplaypresentationchange events being delayed by up to 5 seconds. - Caused a delay to enter or exit WebVR presentation on many sites. MozReview-Commit-ID: 2LACZNwKIxW --HG-- extra : rebase_source : ec689cd68422a8487a85e70d9e2dbb13b3a1c36c
This commit is contained in:
parent
186cacb131
commit
627c745c53
@ -45,6 +45,10 @@ VRDisplayHost::AddLayer(VRLayerParent *aLayer)
|
||||
StartPresentation();
|
||||
}
|
||||
mDisplayInfo.mIsPresenting = mLayers.Length() > 0;
|
||||
|
||||
// Ensure that the content process receives the change immediately
|
||||
VRManager* vm = VRManager::Get();
|
||||
vm->RefreshVRDisplays();
|
||||
}
|
||||
|
||||
void
|
||||
@ -55,6 +59,10 @@ VRDisplayHost::RemoveLayer(VRLayerParent *aLayer)
|
||||
StopPresentation();
|
||||
}
|
||||
mDisplayInfo.mIsPresenting = mLayers.Length() > 0;
|
||||
|
||||
// Ensure that the content process receives the change immediately
|
||||
VRManager* vm = VRManager::Get();
|
||||
vm->RefreshVRDisplays();
|
||||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
|
Loading…
Reference in New Issue
Block a user