Bug 1581988 - Making VR display enumerationCompleted be false when doing enumeration. r=kip a=pascalc
authorDaosheng Mu <daoshengmu@gmail.com>
Fri, 20 Sep 2019 03:26:23 +0300
changeset 555262 8b150aa4228aa08a685796e6364a8458d0864b89
parent 555261 d6318c213e71015dacfceefadcd1f103d7d8109f
child 555263 64258962f918054811dbb496d19a0d11d36e30ea
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip, pascalc
bugs1581988
milestone70.0
Bug 1581988 - Making VR display enumerationCompleted be false when doing enumeration. r=kip a=pascalc If VR process haven't launched yet, we couldn't get available VR displays and its states, so we need to make enumationCompleted to be false, and ask it do the enumeration again. Differential Revision: https://phabricator.services.mozilla.com/D46238
gfx/vr/VRManager.cpp
--- a/gfx/vr/VRManager.cpp
+++ b/gfx/vr/VRManager.cpp
@@ -555,16 +555,17 @@ void VRManager::EnumerateVRDisplays() {
     mServiceHost->StartService();
 #endif
     if (mShmem) {
       mDisplayInfo.Clear();
       mLastUpdateDisplayInfo.Clear();
       mFrameStarted = false;
       mBrowserState.Clear();
       mLastSensorState.Clear();
+      mEnumerationCompleted = false;
       mDisplayInfo.mGroupMask = kVRGroupContent;
       // We must block until enumeration has completed in order
       // to signal that the WebVR promise should be resolved at the
       // right time.
 #if defined(MOZ_WIDGET_ANDROID)
       // In Android, we need to make sure calling
       // GeckoVRManager::SetExternalContext() from an external VR service
       // before doing enumeration.