Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 253177b8b3e7a330eb9a6083be6c1e98de5753ea
      
https://github.com/WebKit/WebKit/commit/253177b8b3e7a330eb9a6083be6c1e98de5753ea
  Author: Sergio Villar Senin <[email protected]>
  Date:   2026-05-12 (Tue, 12 May 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrSession_updateRenderState_preservesLayers.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrSession_updateRenderState_preservesLayers.https.html
    M Source/WebCore/Modules/webxr/WebXRRenderState.cpp

  Log Message:
  -----------
  [WebXR Layers] Only first frame is rendered in threejs samples
https://bugs.webkit.org/show_bug.cgi?id=314558

Reviewed by Dan Glastonbury.

WebXRRenderState's copy constructor (used by clone(), which builds the
pending render state in WebXRSession::updateRenderState) did not copy
m_layers (apart from m_outputCanvas and m_compositionEnabled). As a
consequence, any follow-up updateRenderState() call that only updates
unrelated fields (e.g. depthNear) cloned the active state, populated
only the requested fields, and then replaced the active render state at
the end of the frame with one that has an empty layers list.

As the list of layers to render was empty, nothing was submitted to the
compositor. That was the reason why no updates where shown after those
updateRenderState calls.

Test: 
imported/w3c/web-platform-tests/webxr/layers/xrSession_updateRenderState_preservesLayers.https.html

* 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrSession_updateRenderState_preservesLayers.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrSession_updateRenderState_preservesLayers.https.html:
 Added.
* Source/WebCore/Modules/webxr/WebXRRenderState.cpp:
(WebCore::WebXRRenderState::WebXRRenderState):

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



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

Reply via email to