[webkit-changes] [WebKit/WebKit] fb4278: [WebXR] Service video frame callbacks in WebXRSess...
Ada Chan
noreply at github.com
Wed May 22 12:39:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb427896ee568c0bc173d1611575da7d8b26be49
https://github.com/WebKit/WebKit/commit/fb427896ee568c0bc173d1611575da7d8b26be49
Author: Ada Chan <adachan at apple.com>
Date: 2024-05-22 (Wed, 22 May 2024)
Changed paths:
M Source/WebCore/Modules/webxr/WebXRSession.cpp
M Source/WebCore/Modules/webxr/WebXRSession.h
M Source/WebCore/Modules/webxr/WebXRSystem.cpp
M Source/WebCore/Modules/webxr/WebXRSystem.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
[WebXR] Service video frame callbacks in WebXRSession if page backgrounds 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
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list