Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: befb287e6ce7defbdcb7253a94f51a8a262a59d9 https://github.com/WebKit/WebKit/commit/befb287e6ce7defbdcb7253a94f51a8a262a59d9 Author: Sergio Villar Senin <svil...@igalia.com> Date: 2025-08-27 (Wed, 27 Aug 2025)
Changed paths: M Source/WebKit/SourcesGTK.txt M Source/WebKit/SourcesWPE.txt M Source/WebKit/UIProcess/XR/openxr/OpenXRExtensions.cpp M Source/WebKit/UIProcess/XR/openxr/OpenXRExtensions.h A Source/WebKit/UIProcess/XR/openxr/OpenXRInput.cpp A Source/WebKit/UIProcess/XR/openxr/OpenXRInput.h A Source/WebKit/UIProcess/XR/openxr/OpenXRInputMappings.h A Source/WebKit/UIProcess/XR/openxr/OpenXRInputSource.cpp A Source/WebKit/UIProcess/XR/openxr/OpenXRInputSource.h M Source/WebKit/UIProcess/XR/openxr/OpenXRUtils.h M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h Log Message: ----------- [WebXR][OpenXR] Add input support https://bugs.webkit.org/show_bug.cgi?id=297951 Reviewed by Carlos Garcia Campos. This implements the OpenXR machinery required to retrieve the available input methods for WebXR sessions as long as the information associated to them, like poses, status of buttons, axes, etc... The OpenXR coordinator just need to instance an OpenXRInput object and then ask it to collect the input sources information on every frame. The OpenXRInput object in turn instances as many OpenXRInputSources as required, typically two (one for each hand). Those input sources are the ones that finally query the state of the defined input actions. In order to have all the interaction profiles information in a single place a OpenXRInputMappings header file was created. That would store all the information about the supported interaction profiles and their suggested bindings for the different hardware components they support. So far we define two supported profiles, the hand interaction profile (useful for hand tracking only devices) and the generic simple profile from Khronos which must be supported by all OpenXR runtimes. These changes required converting the OpenXRExtensions object into a singleton as it needs to be accessed by the OpenXRInputSources as well (to check the availability of extensions). * Source/WebKit/SourcesGTK.txt: * Source/WebKit/SourcesWPE.txt: * Source/WebKit/UIProcess/XR/openxr/OpenXRExtensions.cpp: (WebKit::OpenXRExtensions::singleton): (WebKit::OpenXRExtensions::OpenXRExtensions): (WebKit::OpenXRExtensions::create): Deleted. * Source/WebKit/UIProcess/XR/openxr/OpenXRExtensions.h: * Source/WebKit/UIProcess/XR/openxr/OpenXRInput.cpp: Added. (WebKit::OpenXRInput::create): (WebKit::OpenXRInput::OpenXRInput): (WebKit::OpenXRInput::initialize): (WebKit::OpenXRInput::collectInputSources const): (WebKit::OpenXRInput::updateInteractionProfile): * Source/WebKit/UIProcess/XR/openxr/OpenXRInput.h: Added. * Source/WebKit/UIProcess/XR/openxr/OpenXRInputMappings.h: Added. (WebKit::buttonTypeToString): (WebKit::axisTypetoString): * Source/WebKit/UIProcess/XR/openxr/OpenXRInputSource.cpp: Added. (WebKit::OpenXRInputSource::create): (WebKit::OpenXRInputSource::OpenXRInputSource): (WebKit::OpenXRInputSource::~OpenXRInputSource): (WebKit::OpenXRInputSource::initialize): (WebKit::OpenXRInputSource::suggestBindings const): (WebKit::OpenXRInputSource::collectInputSource const): (WebKit::OpenXRInputSource::updateInteractionProfile): (WebKit::OpenXRInputSource::createActionSpace const): (WebKit::OpenXRInputSource::createAction const): (WebKit::OpenXRInputSource::createButtonActions const): (WebKit::OpenXRInputSource::createBinding const): (WebKit::OpenXRInputSource::getPose const): (WebKit::OpenXRInputSource::collectButton const): (WebKit::OpenXRInputSource::collectAxis const): (WebKit::OpenXRInputSource::getActionState const): * Source/WebKit/UIProcess/XR/openxr/OpenXRInputSource.h: Added. (WebKit::OpenXRInputSource::actionSet const): * Source/WebKit/UIProcess/XR/openxr/OpenXRUtils.h: (WebKit::handednessToString): * Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp: (WebKit::OpenXRCoordinator::getPrimaryDeviceInfo): (WebKit::OpenXRCoordinator::startSession): (WebKit::OpenXRCoordinator::createInstance): (WebKit::OpenXRCoordinator::initializeDevice): (WebKit::OpenXRCoordinator::tryInitializeGraphicsBinding): (WebKit::OpenXRCoordinator::createSessionIfNeeded): (WebKit::OpenXRCoordinator::cleanupSessionAndAssociatedResources): (WebKit::OpenXRCoordinator::handleSessionStateChange): (WebKit::OpenXRCoordinator::pollEvents): (WebKit::OpenXRCoordinator::populateFrameData): (WebKit::OpenXRCoordinator::createReferenceSpacesIfNeeded): * Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h: Canonical link: https://commits.webkit.org/299200@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes