Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 60a2c8c774dc80e2ef5b695f8eb365084c43ba0a
      
https://github.com/WebKit/WebKit/commit/60a2c8c774dc80e2ef5b695f8eb365084c43ba0a
  Author: Sergio Villar Senin <[email protected]>
  Date:   2025-10-02 (Thu, 02 Oct 2025)

  Changed paths:
    M Source/WebKit/UIProcess/XR/openxr/OpenXRLayer.cpp
    M Source/WebKit/UIProcess/XR/openxr/OpenXRSwapchain.cpp
    M Source/WebKit/UIProcess/XR/openxr/OpenXRSwapchain.h
    M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp

  Log Message:
  -----------
  [WebXR][OpenXR] Content not shown when asking for canvas without alpha layer
https://bugs.webkit.org/show_bug.cgi?id=299737

Reviewed by Dan Glastonbury.

Content was not rendered on screen because we were trying to
blit buffers with different pixel formats in case an alpha channel
was not requested. We were creating and OpenXR texture with GL_RGB
but WebGL's opaque framebuffer unconditionally uses GL_RGBA.

It is not possible to make the opaque framebuffer to use
RGB instead because it has always to import a texture with an
alpha channel because ANGLE does not support creating an
external texture from a framebuffer with RGB format
(see Source/ThirdParty/ANGLE/src/common/linux/dma_buf_utils.cpp).

So the only solution is to make OpenXR always create swapchains
with alpha channel and then when exporting the texture just
ignore it (by using DRM_FORMAT_XRGBA8888). This way WebGL
and OpenXR will use the same format and blitting will work.

* Source/WebKit/UIProcess/XR/openxr/OpenXRLayer.cpp:
(WebKit::OpenXRLayer::exportOpenXRTextureGBM):
* Source/WebKit/UIProcess/XR/openxr/OpenXRSwapchain.cpp:
(WebKit::OpenXRSwapchain::create):
(WebKit::OpenXRSwapchain::OpenXRSwapchain):
* Source/WebKit/UIProcess/XR/openxr/OpenXRSwapchain.h:
(WebKit::OpenXRSwapchain::hasAlpha const):
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp:
(WebKit::OpenXRCoordinator::createSwapchain const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to