[webkit-changes] [WebKit/WebKit] 901e3d: [WebXR] Pass depth buffers to PlatformXRCoordinato...

Dan Glastonbury noreply at github.com
Mon Sep 2 18:33:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 901e3d24e8892975a8c746b2f899326325c4b5db
      https://github.com/WebKit/WebKit/commit/901e3d24e8892975a8c746b2f899326325c4b5db
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2024-09-02 (Mon, 02 Sep 2024)

  Changed paths:
    M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h
    M Source/WebCore/Modules/webxr/WebXROpaqueFramebufferCocoa.cpp
    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/platform/graphics/transforms/TransformationMatrix.h
    M Source/WebCore/platform/xr/PlatformXR.h
    M Source/WebCore/platform/xr/openxr/PlatformXROpenXR.cpp
    M Source/WebCore/platform/xr/openxr/PlatformXROpenXR.h
    M Source/WebCore/testing/WebFakeXRDevice.cpp
    M Source/WebCore/testing/WebFakeXRDevice.h
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Shared/XR/PlatformXR.serialization.in
    M Source/WebKit/Shared/XR/XRDeviceProxy.cpp
    M Source/WebKit/Shared/XR/XRDeviceProxy.h
    M Source/WebKit/UIProcess/XR/PlatformXRCoordinator.h
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.h
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.messages.in
    M Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.h
    M Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm
    M Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.cpp
    M Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.h

  Log Message:
  -----------
  [WebXR] Pass depth buffers to PlatformXRCoordinator to be used for reprojection
https://bugs.webkit.org/show_bug.cgi?id=278903
rdar://134998453

Reviewed by Mike Wyrzykowski.

For the PlatformXRCoordinator to make use of the contents of the depth buffer
from WebGL rendering to perform re-projection of frames when the page misses the
presentation epoch, the coordinator needs to know the current depth range, which
representations the mapping from the near/far planes to the range supported by
the depth buffer.

The depth range can be changed via the WebXR API and needs to be passes via
XRDevice to the coordinator. This information is passes along with the
requestFrame API when ever new XRRenderState is applied.

Additionally, the hack to clear the depth buffers to FLT_MIN has been removed
from WebXROpaqueFramebuffer. |requestDepth| member of
|PlatformXR::FrameData::LayerData| represents a request from the coordinator for
scene depth to be presented via the passed depth textures.

* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h:
* Source/WebCore/Modules/webxr/WebXROpaqueFramebufferCocoa.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::blitSharedToLayered):
* Source/WebCore/Modules/webxr/WebXRSession.cpp:
(WebCore::WebXRSession::applyPendingRenderState):
(WebCore::WebXRSession::requestFrameIfNeeded):
* Source/WebCore/Modules/webxr/WebXRSession.h:
* Source/WebCore/Modules/webxr/WebXRSystem.cpp:
(WebCore::WebXRSystem::DummyInlineDevice::requestFrame):
* Source/WebCore/Modules/webxr/WebXRSystem.h:
* Source/WebCore/platform/xr/PlatformXR.h:
* Source/WebCore/testing/WebFakeXRDevice.cpp:
(WebCore::SimulatedXRDevice::requestFrame):
* Source/WebCore/testing/WebFakeXRDevice.h:
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Shared/XR/PlatformXR.serialization.in:
* Source/WebKit/Shared/XR/XRDeviceProxy.cpp:
(WebKit::XRDeviceProxy::requestFrame):
* Source/WebKit/Shared/XR/XRDeviceProxy.h:
* Source/WebKit/UIProcess/XR/PlatformXRCoordinator.h:
* Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp:
(WebKit::PlatformXRSystem::requestFrame):
* Source/WebKit/UIProcess/XR/PlatformXRSystem.h:
* Source/WebKit/UIProcess/XR/PlatformXRSystem.messages.in:
* Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.h:
* Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm:
(WebKit::ARKitCoordinator::scheduleAnimationFrame):
* Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.cpp:
(WebKit::PlatformXRSystemProxy::requestFrame):
* Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.h:

Canonical link: https://commits.webkit.org/283077@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