⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283297 in webkit


Ignore:
Timestamp:
Sep 29, 2021, 9:18:17 PM (5 years ago)
Author:
commit-queue@webkit.org
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 <ada.chan@apple.com> on 2021-09-29
Reviewed by Chris Dumez.

  • UIProcess/XR/PlatformXRSystem.cpp:

(WebKit::PlatformXRSystem::initializeTrackingAndRendering):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r283295 r283297  
     12021-09-29  Ada Chan  <ada.chan@apple.com>
     2
     3        [WebXR] Hold a foreground assertion for the duration of the immersive session
     4        https://bugs.webkit.org/show_bug.cgi?id=230991
     5
     6        Reviewed by Chris Dumez.
     7
     8        * UIProcess/XR/PlatformXRSystem.cpp:
     9        (WebKit::PlatformXRSystem::initializeTrackingAndRendering):
     10
    1112021-09-29  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp

    r279822 r283297  
    8080        return;
    8181
    82     xrCoordinator->startSession(m_page, [weakThis = makeWeakPtr(*this)](XRDeviceIdentifier deviceIdentifier) {
    83         RunLoop::main().dispatch([weakThis, deviceIdentifier]() mutable {
     82    auto immersiveSessionActivity = m_page.process().throttler().foregroundActivity("XR immersive session"_s);
     83
     84    xrCoordinator->startSession(m_page, [weakThis = makeWeakPtr(*this), immersiveSessionActivity = WTFMove(immersiveSessionActivity)](XRDeviceIdentifier deviceIdentifier) mutable {
     85        RunLoop::main().dispatch([weakThis, deviceIdentifier, immersiveSessionActivity = WTFMove(immersiveSessionActivity)]() mutable {
    8486            if (weakThis)
    8587                weakThis->m_page.send(Messages::PlatformXRSystemProxy::SessionDidEnd(deviceIdentifier));
Note: See TracChangeset for help on using the changeset viewer.