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

  Changed paths:
    M Source/WebCore/Modules/webxr/XRWebGLCylinderLayerBacking.cpp
    M Source/WebCore/Modules/webxr/XRWebGLEquirectLayerBacking.cpp
    M Source/WebCore/Modules/webxr/XRWebGLLayerBacking.cpp
    M Source/WebCore/Modules/webxr/XRWebGLLayerBacking.h
    M Source/WebCore/Modules/webxr/XRWebGLProjectionLayerBacking.cpp
    M Source/WebCore/Modules/webxr/XRWebGLQuadLayerBacking.cpp

  Log Message:
  -----------
  [WebXR Layers] Non projection layers should share more code
https://bugs.webkit.org/show_bug.cgi?id=314119

Reviewed by Dan Glastonbury.

The code that creates the WebGL layer backing for non projection layers
is nearly identical. We should be able to refactor it and avoid
duplicating code.

By moving the code to the parent we can save ~1/3 of the original code.

Last but not least, when equirect layer support landed we forgot to add
support for depth textures. We are using this refactoring to get that
support "for free".

No new tests as this is a refactoring.

* Source/WebCore/Modules/webxr/XRWebGLCylinderLayerBacking.cpp:
(WebCore::XRWebGLCylinderLayerBacking::create):
* Source/WebCore/Modules/webxr/XRWebGLEquirectLayerBacking.cpp:
(WebCore::XRWebGLEquirectLayerBacking::create):
* Source/WebCore/Modules/webxr/XRWebGLLayerBacking.cpp:
(WebCore::computeNonProjectionLayerSize):
(WebCore::XRWebGLLayerBacking::createCompositionLayerSwapchains):
(WebCore::XRWebGLLayerBacking::createProjectionLayerSwapchains):
(WebCore::XRWebGLLayerBacking::createColorAndDepthSwapchains):
* Source/WebCore/Modules/webxr/XRWebGLLayerBacking.h:
* Source/WebCore/Modules/webxr/XRWebGLProjectionLayerBacking.cpp:
(WebCore::XRWebGLProjectionLayerBacking::create):
* Source/WebCore/Modules/webxr/XRWebGLQuadLayerBacking.cpp:
(WebCore::XRWebGLQuadLayerBacking::create):

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



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

Reply via email to