Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b4d954c0185e8130346ab41ca9180424496f9b29
      
https://github.com/WebKit/WebKit/commit/b4d954c0185e8130346ab41ca9180424496f9b29
  Author: Dan Glastonbury <[email protected]>
  Date:   2025-10-29 (Wed, 29 Oct 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer.https-expected.txt
    M LayoutTests/platform/gtk/TestExpectations
    M LayoutTests/platform/visionos/TestExpectations
    M LayoutTests/platform/wpe/TestExpectations
    M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
    M Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
    M Source/WebCore/html/canvas/WebGLFramebuffer.h
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

  Log Message:
  -----------
  [WebXR] Opaque WebGLFramebuffer incorrect behavior
https://bugs.webkit.org/show_bug.cgi?id=301407
rdar://163317425

Reviewed by Kimmo Kinnunen.

xrWebGLLayer_opaque_framebuffer.https.html fails due to two oversights:
- WebGL2RenderingContext::deleteFramebuffer override is missing the opaque
  check from WebGLRenderingContextBase::deleteFramebuffer.
- WebGLRenderingContextBase::checkFramebufferStatus does not return
  FRAMEBUFFER_UNSUPPORTED when an opaque framebuffer is accessed outside
  a requestAnimationFrame() callback, as required by the WebXR specification.

This change fixes the test by:
1. Adding the opaque framebuffer validation check to
   WebGL2RenderingContext::deleteFramebuffer (matching the base class).
2. Updating WebGLRenderingContextBase::checkFramebufferStatus to return
   FRAMEBUFFER_UNSUPPORTED when an opaque framebuffer is accessed outside
   a WebXR requestAnimationFrame() callback.
3. Tracking WebXR rAF state via WebGLFramebuffer::setInsideWebXRRAF(),
   called from WebXROpaqueFramebuffer::startFrame() and endFrame().

Change expectations and enable xrWebGLLayer_opaque_framebuffer.https.html

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer.https-expected.txt:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/visionos/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame):
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::deleteFramebuffer):
* Source/WebCore/html/canvas/WebGLFramebuffer.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
(WebCore::WebGLRenderingContextBase::deleteFramebuffer):

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



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

Reply via email to