Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ee9f80f307130456aa9c0f3c0eb3870553a8dcad
https://github.com/WebKit/WebKit/commit/ee9f80f307130456aa9c0f3c0eb3870553a8dcad
Author: Sergio Villar Senin <[email protected]>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
M Source/WebCore/Modules/webxr/WebXRSystem.h
M Source/WebCore/Modules/webxr/XRWebGLEquirectLayerBacking.cpp
M Source/WebCore/Modules/webxr/XRWebGLQuadLayerBacking.cpp
M Source/WebCore/platform/xr/PlatformXR.h
M Source/WebCore/testing/WebFakeXRDevice.cpp
M Source/WebCore/testing/WebFakeXRDevice.h
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Shared/XR/PlatformXR.serialization.in
M Source/WebKit/Shared/XR/XRDeviceProxy.cpp
M Source/WebKit/Shared/XR/XRDeviceProxy.h
M Source/WebKit/UIProcess/XR/PlatformXRCoordinator.h
M Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp
M Source/WebKit/UIProcess/XR/PlatformXRSystem.h
M Source/WebKit/UIProcess/XR/PlatformXRSystem.messages.in
M Source/WebKit/UIProcess/XR/openxr/OpenXRLayer.cpp
M Source/WebKit/UIProcess/XR/openxr/OpenXRLayer.h
M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp
M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h
M Source/WebKit/UIProcess/XR/openxr/PlatformXRSystemOpenXR.cpp
M Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.cpp
M Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.h
Log Message:
-----------
[WebXR Layers] Refactor the composition layers code
https://bugs.webkit.org/show_bug.cgi?id=313418
Reviewed by Dan Glastonbury.
Creating new composition layer types involved adding a new IPC message
and the code handling it at the UIProcess side. It turns out that all
those messages were identical as they shared the same data structure
(different layers filled in different optional fields). There is no need
to duplicate all that code.
Upcoming layers, like cube and cylinder would add some more twin
methods. With this refactoring all of them could use the same IPC.
No new tests, this is a refactoring that does not change functionality.
* Source/WebCore/Modules/webxr/WebXRSystem.h:
* Source/WebCore/Modules/webxr/XRWebGLEquirectLayerBacking.cpp:
(WebCore::XRWebGLEquirectLayerBacking::create):
* Source/WebCore/Modules/webxr/XRWebGLQuadLayerBacking.cpp:
(WebCore::XRWebGLQuadLayerBacking::create):
* Source/WebCore/platform/xr/PlatformXR.h:
* Source/WebCore/testing/WebFakeXRDevice.cpp:
(WebCore::SimulatedXRDevice::createCompositionLayer):
(WebCore::SimulatedXRDevice::createQuadLayer): Deleted.
(WebCore::SimulatedXRDevice::createEquirectLayer): Deleted.
* Source/WebCore/testing/WebFakeXRDevice.h:
* Source/WebKit/Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
(headers_for_type):
* Source/WebKit/Shared/XR/PlatformXR.serialization.in:
* Source/WebKit/Shared/XR/XRDeviceProxy.cpp:
(WebKit::XRDeviceProxy::createCompositionLayer):
(WebKit::XRDeviceProxy::createQuadLayer): Deleted.
(WebKit::XRDeviceProxy::createEquirectLayer): Deleted.
* Source/WebKit/Shared/XR/XRDeviceProxy.h:
* Source/WebKit/UIProcess/XR/PlatformXRCoordinator.h:
(WebKit::PlatformXRCoordinator::createCompositionLayer):
(WebKit::PlatformXRCoordinator::createQuadLayer): Deleted.
(WebKit::PlatformXRCoordinator::createEquirectLayer): Deleted.
* Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp:
(WebKit::PlatformXRSystem::createCompositionLayer):
(WebKit::PlatformXRSystem::createQuadLayer): Deleted.
(WebKit::PlatformXRSystem::createEquirectLayer): Deleted.
* Source/WebKit/UIProcess/XR/PlatformXRSystem.h:
* Source/WebKit/UIProcess/XR/PlatformXRSystem.messages.in:
* Source/WebKit/UIProcess/XR/openxr/OpenXRLayer.cpp:
(WebKit::OpenXRCompositionLayer::OpenXRCompositionLayer):
(WebKit::OpenXRQuadLayer::OpenXRQuadLayer):
(WebKit::OpenXREquirectLayer::OpenXREquirectLayer):
* Source/WebKit/UIProcess/XR/openxr/OpenXRLayer.h:
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp:
(WebKit::OpenXRCoordinator::createCompositionLayer):
(WebKit::OpenXRCoordinator::createQuadLayer): Deleted.
(WebKit::OpenXRCoordinator::createEquirectLayer): Deleted.
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h:
* Source/WebKit/UIProcess/XR/openxr/PlatformXRSystemOpenXR.cpp:
(WebKit::PlatformXRSystem::createCompositionLayer):
(WebKit::PlatformXRSystem::createQuadLayer): Deleted.
(WebKit::PlatformXRSystem::createEquirectLayer): Deleted.
* Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.cpp:
(WebKit::PlatformXRSystemProxy::createCompositionLayer):
(WebKit::PlatformXRSystemProxy::createQuadLayer): Deleted.
(WebKit::PlatformXRSystemProxy::createEquirectLayer): Deleted.
* Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.h:
Canonical link: https://commits.webkit.org/312188@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications