Skip to content

Commit

Permalink
Use generated serialization for XRDeviceInfo
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=262784
rdar://116580104

Reviewed by Alex Christensen.

* Source/WebKit/Shared/XR/XRDeviceInfo.cpp: Removed.
* Source/WebKit/Shared/XR/XRDeviceInfo.h:
* Source/WebKit/Shared/XR/XRSystem.serialization.in:
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/269019@main
  • Loading branch information
sheeparegreat authored and gavin-apple committed Oct 6, 2023
1 parent 9cde205 commit 685c571
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 74 deletions.
63 changes: 0 additions & 63 deletions Source/WebKit/Shared/XR/XRDeviceInfo.cpp

This file was deleted.

8 changes: 0 additions & 8 deletions Source/WebKit/Shared/XR/XRDeviceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
#include "XRDeviceIdentifier.h"
#include <WebCore/PlatformXR.h>

namespace IPC {
class Decoder;
class Encoder;
}

namespace WebKit {

struct XRDeviceInfo {
Expand All @@ -43,9 +38,6 @@ struct XRDeviceInfo {
bool supportsStereoRendering { false };
PlatformXR::Device::FeatureList vrFeatures;
WebCore::IntSize recommendedResolution { 0, 0 };

void encode(IPC::Encoder&) const;
static std::optional<XRDeviceInfo> decode(IPC::Decoder&);
};

} // namespace WebKit
Expand Down
8 changes: 8 additions & 0 deletions Source/WebKit/Shared/XR/XRSystem.serialization.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,12 @@ enum class PlatformXR::SessionFeature : uint8_t {
HandTracking,
#endif
};

struct WebKit::XRDeviceInfo {
WebKit::XRDeviceIdentifier identifier;
bool supportsOrientationTracking;
bool supportsStereoRendering;
PlatformXR::Device::FeatureList vrFeatures;
WebCore::IntSize recommendedResolution;
};
#endif
1 change: 0 additions & 1 deletion Source/WebKit/Sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ Shared/WebGPU/WebGPUVertexState.cpp

Shared/WebsiteData/WebsiteData.cpp

Shared/XR/XRDeviceInfo.cpp
Shared/XR/XRDeviceProxy.cpp

UIProcess/AuxiliaryProcessProxy.cpp
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit/WebKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3125,7 +3125,6 @@
118502612673B0DA00A6425E /* XRDeviceProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XRDeviceProxy.h; sourceTree = "<group>"; };
118502622673B0DA00A6425E /* XRDeviceProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = XRDeviceProxy.cpp; sourceTree = "<group>"; };
118502632673B0DA00A6425E /* XRDeviceIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XRDeviceIdentifier.h; sourceTree = "<group>"; };
118502642673B0DA00A6425E /* XRDeviceInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = XRDeviceInfo.cpp; sourceTree = "<group>"; };
118502652673B0DA00A6425E /* XRDeviceInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XRDeviceInfo.h; sourceTree = "<group>"; };
1A002D3E196B329400B9AD44 /* _WKSessionState.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKSessionState.mm; sourceTree = "<group>"; };
1A002D3F196B329400B9AD44 /* _WKSessionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSessionState.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -8052,7 +8051,6 @@
isa = PBXGroup;
children = (
118502632673B0DA00A6425E /* XRDeviceIdentifier.h */,
118502642673B0DA00A6425E /* XRDeviceInfo.cpp */,
118502652673B0DA00A6425E /* XRDeviceInfo.h */,
118502622673B0DA00A6425E /* XRDeviceProxy.cpp */,
118502612673B0DA00A6425E /* XRDeviceProxy.h */,
Expand Down

0 comments on commit 685c571

Please sign in to comment.