-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PlatformXR::Device should inherit from ThreadSafeRefCountedAndCanMake…
…ThreadSafeWeakPtr<> https://bugs.webkit.org/show_bug.cgi?id=258494 <rdar://111265303> Reviewed by Alex Christensen. * Source/WebCore/Modules/webxr/WebXRSession.cpp: (WebCore::WebXRSession::WebXRSession): - Use `device` argument instead of calling m_device.get(). (WebCore::WebXRSession::~WebXRSession): (WebCore::WebXRSession::referenceSpaceIsSupported const): (WebCore::WebXRSession::requestReferenceSpace): (WebCore::WebXRSession::recommendedWebGLFramebufferResolution const): (WebCore::WebXRSession::supportsViewportScaling const): (WebCore::WebXRSession::shutdown): (WebCore::WebXRSession::didCompleteShutdown): (WebCore::WebXRSession::requestFrameIfNeeded): (WebCore::WebXRSession::onFrame): * Source/WebCore/Modules/webxr/WebXRSession.h: * Source/WebCore/Modules/webxr/WebXRSystem.cpp: (WebCore::WebXRSystem::WebXRSystem): - Switch to use DummyInlineDevice::create(). (WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected): (WebCore::WebXRSystem::obtainCurrentDevice): (WebCore::WebXRSystem::isSessionSupported): (WebCore::WebXRSystem::resolveRequestedFeatures const): (WebCore::WebXRSystem::resolveFeaturePermissions const): (WebCore::WebXRSystem::requestSession): (WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting): (WebCore::WebXRSystem::DummyInlineDevice::create): Add. * Source/WebCore/Modules/webxr/WebXRSystem.h: (WebCore::WebXRSystem::hasActiveImmersiveXRDevice): - Switch from using `PlatformXR::Device*` to `ThreadSafeWeakPtr<PlatformXR::Device>`. (WebCore::WebXRSystem::DummyInlineDevice::create): Add. * Source/WebCore/platform/xr/PlatformXR.h: - Change PlatformXR::Device to inherit from ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<> since it currently inherits from ThreadSafeRefCounted<> and CanMakeWeakPtr<> separately. (PlatformXR::Device::ref const): Add. (PlatformXR::Device::deref const): Add. (PlatformXR::Device::controlBlock const): Add. - Add methods needed for ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<>. * Source/WebCore/platform/xr/openxr/PlatformXROpenXR.cpp: (PlatformXR::OpenXRDevice::~OpenXRDevice): Remove. (PlatformXR::OpenXRDevice::endSession): (PlatformXR::OpenXRDevice::updateInteractionProfile): - Switch from using `WeakPtr<PlatformXR::Device>` to `ThreadSafeWeakPtr<PlatformXR::Device>`. * Source/WebCore/platform/xr/openxr/PlatformXROpenXR.h: (WebCore::PlatformXR::OpenXRDevice::~OpenXRDevice): - Make destructor virtual and define as default here. * Source/WebCore/testing/WebFakeXRDevice.cpp: (WebCore::SimulatedXRDevice::initializeTrackingAndRendering): - Switch from using `WeakPtr<PlatformXR::Device>` to `ThreadSafeWeakPtr<PlatformXR::Device>`. * Source/WebCore/testing/WebFakeXRDevice.h: (WebCore::SimulatedXRDevice::~SimulatedXRDevice): - Make destructor virtual. * Source/WebKit/Shared/XR/XRDeviceProxy.cpp: (WebKit::XRDeviceProxy::initializeTrackingAndRendering): - Switch from using `WeakPtr<PlatformXR::Device>` to `ThreadSafeWeakPtr<PlatformXR::Device>`. Canonical link: https://commits.webkit.org/267114@main
- Loading branch information
Showing
10 changed files
with
104 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.