Bug 1460619 - Do not run frame request callbacks immediately after updating a VR layer. r=dmu, a=RyanVM
authorKearwood "Kip" Gilbert <kgilbert@mozilla.com>
Wed, 02 Jan 2019 13:32:09 -0800
changeset 509349 143b609b1cd17e212b17055fee6f221de557569c
parent 509348 6e20c532e3dbdf8494370f23cf83c92e3d52ac42
child 509350 af69c79ed942333be69d006576476ea624726ae9
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmu, RyanVM
bugs1460619
milestone65.0
Bug 1460619 - Do not run frame request callbacks immediately after updating a VR layer. r=dmu, a=RyanVM
gfx/vr/ipc/VRLayerChild.cpp
--- a/gfx/vr/ipc/VRLayerChild.cpp
+++ b/gfx/vr/ipc/VRLayerChild.cpp
@@ -30,23 +30,17 @@ VRLayerChild::~VRLayerChild() {
 }
 
 void VRLayerChild::Initialize(dom::HTMLCanvasElement* aCanvasElement,
                               const gfx::Rect& aLeftEyeRect,
                               const gfx::Rect& aRightEyeRect) {
   MOZ_ASSERT(aCanvasElement);
   mLeftEyeRect = aLeftEyeRect;
   mRightEyeRect = aRightEyeRect;
-  if (mCanvasElement == nullptr) {
-    mCanvasElement = aCanvasElement;
-    VRManagerChild* vrmc = VRManagerChild::Get();
-    vrmc->RunFrameRequestCallbacks();
-  } else {
-    mCanvasElement = aCanvasElement;
-  }
+  mCanvasElement = aCanvasElement;
 }
 
 void VRLayerChild::SubmitFrame(const VRDisplayInfo& aDisplayInfo) {
   uint64_t frameId = aDisplayInfo.GetFrameId();
 
   // aFrameId will not increment unless the previuosly submitted
   // frame was received by the VR thread and submitted to the VR
   // compositor.  We early-exit here in the event that SubmitFrame