зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1501869 - Part 1: Refine the mechanism for VR tasks. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9879 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0e4ed25c34
Коммит
4db1e662d5
|
@ -166,7 +166,6 @@ VRManager::Shutdown()
|
|||
void
|
||||
VRManager::Init()
|
||||
{
|
||||
StartTasks();
|
||||
mInitialized = true;
|
||||
}
|
||||
|
||||
|
@ -447,6 +446,7 @@ VRManager::NotifyVRVsync(const uint32_t& aDisplayID)
|
|||
void
|
||||
VRManager::EnumerateVRDisplays()
|
||||
{
|
||||
StartTasks();
|
||||
/**
|
||||
* Throttle the rate of enumeration to the interval set in
|
||||
* VRDisplayEnumerateInterval
|
||||
|
|
|
@ -33,6 +33,7 @@ class VRSystemManagerExternal;
|
|||
class VRManager
|
||||
{
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(mozilla::gfx::VRManager)
|
||||
friend class VRManagerParent;
|
||||
|
||||
public:
|
||||
static void ManagerInit();
|
||||
|
|
|
@ -242,7 +242,8 @@ OculusSession::Initialize(mozilla::gfx::VRSystemState& aSystemState)
|
|||
if (!CreateShaders()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ideally, we should move LoadOvrLib() up to the first line to avoid
|
||||
// unnecessary D3D objects creation. But it will cause a WPT fail in Win 7 debug.
|
||||
if (!LoadOvrLib()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -134,6 +134,7 @@ VRService::Start()
|
|||
options.permanent_hang_timeout = 2048; // milliseconds
|
||||
|
||||
if (!mServiceThread->StartWithOptions(options)) {
|
||||
mServiceThread->Stop();
|
||||
delete mServiceThread;
|
||||
mServiceThread = nullptr;
|
||||
return;
|
||||
|
@ -151,6 +152,7 @@ VRService::Stop()
|
|||
{
|
||||
if (mServiceThread) {
|
||||
mShutdownRequested = true;
|
||||
mServiceThread->Stop();
|
||||
delete mServiceThread;
|
||||
mServiceThread = nullptr;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче