Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ba71881df7b187b73d128b6e96437d4bb8b2579
      
https://github.com/WebKit/WebKit/commit/6ba71881df7b187b73d128b6e96437d4bb8b2579
  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/xrProjectionLayer_initialTextureSize.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrProjectionLayer_initialTextureSize.https.html
    M Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.cpp
    M Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.h
    M Source/WebCore/Modules/webxr/XRWebGLLayerBacking.cpp

  Log Message:
  -----------
  [WebXR Layers] Nothing is rendered in threejs XR examples
https://bugs.webkit.org/show_bug.cgi?id=314556

Reviewed by Dan Glastonbury.

Soon after creating a projection layer the size of the textures backing
that layer should be available and exposed to JS. However the current
code was waiting for the first texture to be created and available to
set the size. It's fine to set the available size at creation time as
specs describes them as the "recommended width/height of color textures
for this layer" based on what the device says and the scale factor.

That was the reason why threejs examples were failing, because they were
checking the size of the textures soon after creating the layer without
waiting for the first rAF.

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

* 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrProjectionLayer_initialTextureSize.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/webxr/layers/xrProjectionLayer_initialTextureSize.https.html:
 Added.
* Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.cpp:
(WebCore::WebXRWebGLSharedImageSwapchain::create):
(WebCore::WebXRWebGLSharedImageSwapchain::WebXRWebGLSharedImageSwapchain):
* Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.h:
* Source/WebCore/Modules/webxr/XRWebGLLayerBacking.cpp:
(WebCore::XRWebGLLayerBacking::createColorAndDepthSwapchains):

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



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

Reply via email to