Title: [277324] trunk/Source/WebKit
- Revision
- 277324
- Author
- [email protected]
- Date
- 2021-05-11 07:55:53 -0700 (Tue, 11 May 2021)
Log Message
[WebXR] Return a default layer handle in XRDeviceProxy::createLayerProjection
https://bugs.webkit.org/show_bug.cgi?id=225631
Patch by Ada Chan <[email protected]> on 2021-05-11
Reviewed by Dean Jackson.
* Shared/Cocoa/XRDeviceProxy.h:
* Shared/Cocoa/XRDeviceProxy.mm:
(WebKit::XRDeviceProxy::createLayerProjection):
* UIProcess/Cocoa/PlatformXRCoordinator.h:
(WebKit::PlatformXRCoordinator::defaultLayerHandle):
* WebProcess/cocoa/PlatformXRSystemProxy.h:
* WebProcess/cocoa/PlatformXRSystemProxy.mm:
(WebKit::PlatformXRSystemProxy::createLayerProjection):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (277323 => 277324)
--- trunk/Source/WebKit/ChangeLog 2021-05-11 13:53:32 UTC (rev 277323)
+++ trunk/Source/WebKit/ChangeLog 2021-05-11 14:55:53 UTC (rev 277324)
@@ -1,3 +1,19 @@
+2021-05-11 Ada Chan <[email protected]>
+
+ [WebXR] Return a default layer handle in XRDeviceProxy::createLayerProjection
+ https://bugs.webkit.org/show_bug.cgi?id=225631
+
+ Reviewed by Dean Jackson.
+
+ * Shared/Cocoa/XRDeviceProxy.h:
+ * Shared/Cocoa/XRDeviceProxy.mm:
+ (WebKit::XRDeviceProxy::createLayerProjection):
+ * UIProcess/Cocoa/PlatformXRCoordinator.h:
+ (WebKit::PlatformXRCoordinator::defaultLayerHandle):
+ * WebProcess/cocoa/PlatformXRSystemProxy.h:
+ * WebProcess/cocoa/PlatformXRSystemProxy.mm:
+ (WebKit::PlatformXRSystemProxy::createLayerProjection):
+
2021-05-10 Wenson Hsieh <[email protected]>
[macOS] Allow immediate action gestures to begin when force clicking text inside image overlays
Modified: trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h (277323 => 277324)
--- trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h 2021-05-11 13:53:32 UTC (rev 277323)
+++ trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h 2021-05-11 14:55:53 UTC (rev 277324)
@@ -56,7 +56,7 @@
void initializeReferenceSpace(PlatformXR::ReferenceSpaceType) final { }
Vector<PlatformXR::Device::ViewData> views(PlatformXR::SessionMode) const final;
void requestFrame(PlatformXR::Device::RequestFrameCallback&&) final;
- Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool) override { return WTF::nullopt; };
+ Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool) final;
void deleteLayer(PlatformXR::LayerHandle) override { };
XRDeviceIdentifier m_identifier;
Modified: trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm (277323 => 277324)
--- trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm 2021-05-11 13:53:32 UTC (rev 277323)
+++ trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm 2021-05-11 14:55:53 UTC (rev 277324)
@@ -88,6 +88,11 @@
m_xrSystem->requestFrame(WTFMove(callback));
}
+Optional<PlatformXR::LayerHandle> XRDeviceProxy::createLayerProjection(uint32_t width, uint32_t height, bool alpha)
+{
+ return m_xrSystem ? m_xrSystem->createLayerProjection(width, height, alpha) : WTF::nullopt;
+}
+
} // namespace WebKit
#endif // ENABLE(WEBXR)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h (277323 => 277324)
--- trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h 2021-05-11 13:53:32 UTC (rev 277323)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h 2021-05-11 14:55:53 UTC (rev 277324)
@@ -41,6 +41,9 @@
public:
virtual ~PlatformXRCoordinator() = default;
+ // FIXME: Temporary and will be fixed later.
+ static PlatformXR::LayerHandle defaultLayerHandle() { return 1; }
+
using DeviceInfoCallback = Function<void(Optional<XRDeviceInfo>)>;
virtual void getPrimaryDeviceInfo(DeviceInfoCallback&&) = 0;
Modified: trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h (277323 => 277324)
--- trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h 2021-05-11 13:53:32 UTC (rev 277323)
+++ trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h 2021-05-11 14:55:53 UTC (rev 277324)
@@ -45,6 +45,7 @@
void initializeTrackingAndRendering();
void shutDownTrackingAndRendering();
void requestFrame(PlatformXR::Device::RequestFrameCallback&&);
+ Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool);
private:
RefPtr<XRDeviceProxy> deviceByIdentifier(XRDeviceIdentifier);
Modified: trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm (277323 => 277324)
--- trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm 2021-05-11 13:53:32 UTC (rev 277323)
+++ trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm 2021-05-11 14:55:53 UTC (rev 277324)
@@ -28,6 +28,7 @@
#if ENABLE(WEBXR)
+#import "PlatformXRCoordinator.h"
#import "PlatformXRSystemMessages.h"
#import "PlatformXRSystemProxyMessages.h"
#import "WebPage.h"
@@ -83,6 +84,11 @@
m_page.sendWithAsyncReply(Messages::PlatformXRSystem::RequestFrame(), WTFMove(callback));
}
+Optional<PlatformXR::LayerHandle> PlatformXRSystemProxy::createLayerProjection(uint32_t, uint32_t, bool)
+{
+ return PlatformXRCoordinator::defaultLayerHandle();
+}
+
void PlatformXRSystemProxy::sessionDidEnd(XRDeviceIdentifier deviceIdentifier)
{
if (auto device = deviceByIdentifier(deviceIdentifier))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes