Title: [283297] trunk/Source/WebKit
- Revision
- 283297
- Author
- [email protected]
- Date
- 2021-09-29 21:18:17 -0700 (Wed, 29 Sep 2021)
Log Message
[WebXR] Hold a foreground assertion for the duration of the immersive session
https://bugs.webkit.org/show_bug.cgi?id=230991
Patch by Ada Chan <[email protected]> on 2021-09-29
Reviewed by Chris Dumez.
* UIProcess/XR/PlatformXRSystem.cpp:
(WebKit::PlatformXRSystem::initializeTrackingAndRendering):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (283296 => 283297)
--- trunk/Source/WebKit/ChangeLog 2021-09-30 02:33:01 UTC (rev 283296)
+++ trunk/Source/WebKit/ChangeLog 2021-09-30 04:18:17 UTC (rev 283297)
@@ -1,3 +1,13 @@
+2021-09-29 Ada Chan <[email protected]>
+
+ [WebXR] Hold a foreground assertion for the duration of the immersive session
+ https://bugs.webkit.org/show_bug.cgi?id=230991
+
+ Reviewed by Chris Dumez.
+
+ * UIProcess/XR/PlatformXRSystem.cpp:
+ (WebKit::PlatformXRSystem::initializeTrackingAndRendering):
+
2021-09-29 Chris Dumez <[email protected]>
Add support for running service workers on the main thread
Modified: trunk/Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp (283296 => 283297)
--- trunk/Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp 2021-09-30 02:33:01 UTC (rev 283296)
+++ trunk/Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp 2021-09-30 04:18:17 UTC (rev 283297)
@@ -79,8 +79,10 @@
if (!xrCoordinator)
return;
- xrCoordinator->startSession(m_page, [weakThis = makeWeakPtr(*this)](XRDeviceIdentifier deviceIdentifier) {
- RunLoop::main().dispatch([weakThis, deviceIdentifier]() mutable {
+ auto immersiveSessionActivity = m_page.process().throttler().foregroundActivity("XR immersive session"_s);
+
+ xrCoordinator->startSession(m_page, [weakThis = makeWeakPtr(*this), immersiveSessionActivity = WTFMove(immersiveSessionActivity)](XRDeviceIdentifier deviceIdentifier) mutable {
+ RunLoop::main().dispatch([weakThis, deviceIdentifier, immersiveSessionActivity = WTFMove(immersiveSessionActivity)]() mutable {
if (weakThis)
weakThis->m_page.send(Messages::PlatformXRSystemProxy::SessionDidEnd(deviceIdentifier));
});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes