-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebXR] Service video frame callbacks in WebXRSession if page backgro…
…unds during immersive WebXR session https://bugs.webkit.org/show_bug.cgi?id=273901 rdar://124236441 Reviewed by Simon Fraser and Jer Noble. Instead of not freezing the layer tree if the page gets backgrounded during an immersive WebXR session so video frame callbacks can continue to be serviced, just service the video frame callbacks in the XR session. * Source/WebCore/Modules/webxr/WebXRSession.cpp: (WebCore::WebXRSession::minimalUpdateRendering): We'll special case servicing the video frame callbacks as the minimum render updates we'll do in XR session's rAF if the page is backgrounded. (WebCore::WebXRSession::onFrame): * Source/WebCore/Modules/webxr/WebXRSession.h: * Source/WebCore/Modules/webxr/WebXRSystem.cpp: (WebCore::WebXRSystem::activeImmersiveSession const): (WebCore::WebXRSystem::hasActiveImmersiveSession const): Deleted. * Source/WebCore/Modules/webxr/WebXRSystem.h: * Source/WebCore/page/Page.cpp: (WebCore::Page::applicationDidEnterBackground): (WebCore::Page::applicationWillEnterForeground): (WebCore::Page::hasActiveImmersiveSession const): (WebCore::Page::activeImmersiveXRSession const): (WebCore::Page::shouldBlockLayerTreeFreezingForVideo): Deleted. * Source/WebCore/page/Page.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updateDrawingAreaLayerTreeFreezeState): Remove the logic to prevent the freezing of the layer tree if the page is backgrounded due to an active immersive session. It's not good for performance to continue render updates for the page when it's backgrounded and not visible. Canonical link: https://commits.webkit.org/279146@main
- Loading branch information
1 parent
538cc4d
commit fb42789
Showing
7 changed files
with
70 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters