Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1c728046611ca5d5550b542f3041db07ab9feb0f
      
https://github.com/WebKit/WebKit/commit/1c728046611ca5d5550b542f3041db07ab9feb0f
  Author: Sergio Villar Senin <[email protected]>
  Date:   2025-11-11 (Tue, 11 Nov 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/webxr/ar-module/xrSession_environmentBlendMode.https-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/webxr/ar-module/xrSession_environmentBlendMode.https.html
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/Modules/webxr/WebXRSession.cpp
    M Source/WebCore/Modules/webxr/WebXRSession.h
    M Source/WebCore/Modules/webxr/XREnvironmentBlendMode.h
    M Source/WebCore/Modules/webxr/XREnvironmentBlendMode.idl
    M Source/WebCore/platform/xr/PlatformXR.h
    M Source/WebCore/testing/WebFakeXRDevice.cpp
    M Source/WebKit/Shared/XR/PlatformXR.serialization.in
    M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp
    M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h

  Log Message:
  -----------
  [WebXR] XRSession::environmentBlendMode always returns "opaque"
https://bugs.webkit.org/show_bug.cgi?id=302262

Reviewed by Dan Glastonbury.

The environmentBlendMode attribute of the XRSession was never updated
with the blend technique used by the XR compositor and thus was always
returning "opaque" as it was the value used for initialization.

A new attribute was added to the FrameData structure that carries the
blend mode currently used by the compositor. Note that it makes sense to
report it per frame as the compositor might decide to switch the blend
mode (for example as a result of specifying hints like
XRRenderState::passthroughFullyObscured). The specs even mention "The
environmentBlendMode attribute MUST report the XREnvironmentBlendMode
value that matches blend technique currently being performed by the XR
Compositor."

Then environment blend mode test PASS now for both immersive-vr and
immersive-ar sessions. The test was updated because it was trying to
read the attribute value without requesting frames which does not make
much sense as the environment blend mode might change over time.

* 
LayoutTests/imported/w3c/web-platform-tests/webxr/ar-module/xrSession_environmentBlendMode.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/webxr/ar-module/xrSession_environmentBlendMode.https.html:
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/webxr/WebXRSession.cpp:
(WebCore::WebXRSession::environmentBlendMode const):
* Source/WebCore/Modules/webxr/WebXRSession.h:
* Source/WebCore/Modules/webxr/XREnvironmentBlendMode.h:
* Source/WebCore/Modules/webxr/XREnvironmentBlendMode.idl:
* Source/WebCore/platform/xr/PlatformXR.h:
(PlatformXR::FrameData::copy const):
* Source/WebCore/testing/WebFakeXRDevice.cpp:
(WebCore::SimulatedXRDevice::initializeTrackingAndRendering):
* Source/WebKit/Shared/XR/PlatformXR.serialization.in:
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp:
(WebKit::OpenXRCoordinator::blendModeForSessionMode const):
(WebKit::OpenXRCoordinator::populateFrameData):
(WebKit::OpenXRCoordinator::endFrame):
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h:

Canonical link: https://commits.webkit.org/302836@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to