Loading gfx/layers/ipc/CompositorVsyncScheduler.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -176,7 +176,16 @@ bool CompositorVsyncScheduler::NotifyVsync(const VsyncEvent& aVsync) { MOZ_ASSERT_IF(XRE_GetProcessType() == GeckoProcessType_GPU, CompositorThreadHolder::IsInCompositorThread()); MOZ_ASSERT(!NS_IsMainThread()); #if defined(MOZ_WIDGET_ANDROID) gfx::VRManager* vm = gfx::VRManager::Get(); if (!vm->IsPresenting()) { PostCompositeTask(aVsync.mId, aVsync.mTime); } #else PostCompositeTask(aVsync.mId, aVsync.mTime); #endif // defined(MOZ_WIDGET_ANDROID) PostVRTask(aVsync.mTime); return true; } Loading gfx/vr/VRManager.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -795,5 +795,15 @@ void VRManager::StopVRNavigation(const uint32_t& aDisplayID, } } bool VRManager::IsPresenting() { for (const auto& manager : mManagers) { if (manager->GetIsPresenting()) { return true; } } return false; } } // namespace gfx } // namespace mozilla gfx/vr/VRManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ class VRManager { const TimeDuration& aTimeout); void Shutdown(); bool IsPresenting(); protected: VRManager(); Loading layout/base/nsRefreshDriver.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,10 @@ #include "nsDisplayList.h" #include "nsTransitionManager.h" #if defined(MOZ_WIDGET_ANDROID) # include "VRManager.h" #endif // defined(MOZ_WIDGET_ANDROID) #ifdef MOZ_XUL # include "nsXULPopupManager.h" #endif Loading Loading @@ -1747,6 +1751,14 @@ void nsRefreshDriver::Tick(VsyncId aId, TimeStamp aNowTime) { return; } #if defined(MOZ_WIDGET_ANDROID) gfx::VRManager* vm = gfx::VRManager::Get(); if (vm->IsPresenting()) { RunFrameRequestCallbacks(aNowTime); return; } #endif // defined(MOZ_WIDGET_ANDROID) AUTO_PROFILER_LABEL("nsRefreshDriver::Tick", LAYOUT); // We're either frozen or we were disconnected (likely in the middle Loading Loading
gfx/layers/ipc/CompositorVsyncScheduler.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -176,7 +176,16 @@ bool CompositorVsyncScheduler::NotifyVsync(const VsyncEvent& aVsync) { MOZ_ASSERT_IF(XRE_GetProcessType() == GeckoProcessType_GPU, CompositorThreadHolder::IsInCompositorThread()); MOZ_ASSERT(!NS_IsMainThread()); #if defined(MOZ_WIDGET_ANDROID) gfx::VRManager* vm = gfx::VRManager::Get(); if (!vm->IsPresenting()) { PostCompositeTask(aVsync.mId, aVsync.mTime); } #else PostCompositeTask(aVsync.mId, aVsync.mTime); #endif // defined(MOZ_WIDGET_ANDROID) PostVRTask(aVsync.mTime); return true; } Loading
gfx/vr/VRManager.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -795,5 +795,15 @@ void VRManager::StopVRNavigation(const uint32_t& aDisplayID, } } bool VRManager::IsPresenting() { for (const auto& manager : mManagers) { if (manager->GetIsPresenting()) { return true; } } return false; } } // namespace gfx } // namespace mozilla
gfx/vr/VRManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ class VRManager { const TimeDuration& aTimeout); void Shutdown(); bool IsPresenting(); protected: VRManager(); Loading
layout/base/nsRefreshDriver.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,10 @@ #include "nsDisplayList.h" #include "nsTransitionManager.h" #if defined(MOZ_WIDGET_ANDROID) # include "VRManager.h" #endif // defined(MOZ_WIDGET_ANDROID) #ifdef MOZ_XUL # include "nsXULPopupManager.h" #endif Loading Loading @@ -1747,6 +1751,14 @@ void nsRefreshDriver::Tick(VsyncId aId, TimeStamp aNowTime) { return; } #if defined(MOZ_WIDGET_ANDROID) gfx::VRManager* vm = gfx::VRManager::Get(); if (vm->IsPresenting()) { RunFrameRequestCallbacks(aNowTime); return; } #endif // defined(MOZ_WIDGET_ANDROID) AUTO_PROFILER_LABEL("nsRefreshDriver::Tick", LAYOUT); // We're either frozen or we were disconnected (likely in the middle Loading