Title: [278258] trunk/Source/WebKit
- Revision
- 278258
- Author
- d...@apple.com
- Date
- 2021-05-30 14:36:53 -0700 (Sun, 30 May 2021)
Log Message
[WebXR] Send recommendedResolution using DeviceProxy
https://bugs.webkit.org/show_bug.cgi?id=226402
<rdar://problem/78635475>
Reviewed by Tim Horton.
Add a recommendedResolution field to DeviceInfo and send
it across processes using the XRDeviceProxy.
* Shared/Cocoa/XRDeviceInfo.h:
* Shared/Cocoa/XRDeviceInfo.mm:
(WebKit::XRDeviceInfo::encode const):
(WebKit::XRDeviceInfo::decode):
* Shared/Cocoa/XRDeviceProxy.h:
* Shared/Cocoa/XRDeviceProxy.mm:
(WebKit::XRDeviceProxy::XRDeviceProxy):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (278257 => 278258)
--- trunk/Source/WebKit/ChangeLog 2021-05-30 20:35:59 UTC (rev 278257)
+++ trunk/Source/WebKit/ChangeLog 2021-05-30 21:36:53 UTC (rev 278258)
@@ -1,3 +1,22 @@
+2021-05-30 Dean Jackson <d...@apple.com>
+
+ [WebXR] Send recommendedResolution using DeviceProxy
+ https://bugs.webkit.org/show_bug.cgi?id=226402
+ <rdar://problem/78635475>
+
+ Reviewed by Tim Horton.
+
+ Add a recommendedResolution field to DeviceInfo and send
+ it across processes using the XRDeviceProxy.
+
+ * Shared/Cocoa/XRDeviceInfo.h:
+ * Shared/Cocoa/XRDeviceInfo.mm:
+ (WebKit::XRDeviceInfo::encode const):
+ (WebKit::XRDeviceInfo::decode):
+ * Shared/Cocoa/XRDeviceProxy.h:
+ * Shared/Cocoa/XRDeviceProxy.mm:
+ (WebKit::XRDeviceProxy::XRDeviceProxy):
+
2021-05-30 Wenson Hsieh <wenson_hs...@apple.com>
[iOS] UI process crashes when deallocating WKWebView in a script message handler during an active touch event
Modified: trunk/Source/WebKit/Shared/Cocoa/XRDeviceInfo.h (278257 => 278258)
--- trunk/Source/WebKit/Shared/Cocoa/XRDeviceInfo.h 2021-05-30 20:35:59 UTC (rev 278257)
+++ trunk/Source/WebKit/Shared/Cocoa/XRDeviceInfo.h 2021-05-30 21:36:53 UTC (rev 278258)
@@ -42,6 +42,7 @@
bool supportsOrientationTracking { false };
bool supportsStereoRendering { false };
PlatformXR::Device::FeatureList features;
+ WebCore::IntSize recommendedResolution { 0, 0 };
void encode(IPC::Encoder&) const;
static std::optional<XRDeviceInfo> decode(IPC::Decoder&);
Modified: trunk/Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm (278257 => 278258)
--- trunk/Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm 2021-05-30 20:35:59 UTC (rev 278257)
+++ trunk/Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm 2021-05-30 21:36:53 UTC (rev 278258)
@@ -34,7 +34,7 @@
void XRDeviceInfo::encode(IPC::Encoder& encoder) const
{
- encoder << identifier << supportsOrientationTracking << supportsStereoRendering << features;
+ encoder << identifier << supportsOrientationTracking << supportsStereoRendering << features << recommendedResolution;
}
std::optional<XRDeviceInfo> XRDeviceInfo::decode(IPC::Decoder& decoder)
@@ -52,6 +52,9 @@
if (!decoder.decode(deviceFeatures.features))
return std::nullopt;
+ if (!decoder.decode(deviceFeatures.recommendedResolution))
+ return std::nullopt;
+
return deviceFeatures;
}
Modified: trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h (278257 => 278258)
--- trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h 2021-05-30 20:35:59 UTC (rev 278257)
+++ trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h 2021-05-30 21:36:53 UTC (rev 278258)
@@ -50,6 +50,7 @@
private:
XRDeviceProxy(XRDeviceInfo&&, PlatformXRSystemProxy&);
+ WebCore::IntSize recommendedResolution(PlatformXR::SessionMode) final { return m_recommendedResolution; }
void initializeTrackingAndRendering(PlatformXR::SessionMode) final;
void shutDownTrackingAndRendering() final;
bool supportsSessionShutdownNotification() const final { return true; }
@@ -63,6 +64,7 @@
XRDeviceIdentifier m_identifier;
WeakPtr<PlatformXRSystemProxy> m_xrSystem;
bool m_supportsStereoRendering { false };
+ WebCore::IntSize m_recommendedResolution { 0, 0 };
};
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm (278257 => 278258)
--- trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm 2021-05-30 20:35:59 UTC (rev 278257)
+++ trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm 2021-05-30 21:36:53 UTC (rev 278258)
@@ -46,6 +46,7 @@
m_identifier = deviceInfo.identifier;
m_supportsStereoRendering = deviceInfo.supportsStereoRendering;
m_supportsOrientationTracking = deviceInfo.supportsOrientationTracking;
+ m_recommendedResolution = deviceInfo.recommendedResolution;
if (!deviceInfo.features.isEmpty())
setEnabledFeatures(SessionMode::ImmersiveVr, deviceInfo.features);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes