Changeset 270067 in webkit
- Timestamp:
- Nov 19, 2020 8:32:46 PM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 19 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r270052 r270067 1 2020-11-19 Ada Chan <adachan@apple.com> 2 3 Turn on ENABLE_WEBXR for Cocoa 4 https://bugs.webkit.org/show_bug.cgi?id=219171 5 6 Reviewed by Tim Horton. 7 8 * wtf/PlatformEnableCocoa.h: 9 * wtf/PlatformUse.h: 10 1 11 2020-11-19 Saam Barati <sbarati@apple.com> 2 12 -
trunk/Source/WTF/wtf/PlatformEnableCocoa.h
r269880 r270067 591 591 #endif 592 592 593 #if !defined(ENABLE_WEBXR) && (HAVE(WEBXR_INTERNALS) || (USE(APPLE_INTERNAL_SDK) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)) 594 #define ENABLE_WEBXR 1 595 #endif 596 593 597 #if !defined(ENABLE_WEB_API_STATISTICS) 594 598 #define ENABLE_WEB_API_STATISTICS 1 -
trunk/Source/WTF/wtf/PlatformUse.h
r270052 r270067 327 327 #endif 328 328 #endif 329 330 #if PLATFORM(COCOA) 331 #define USE_OPENXR 0 332 #endif -
trunk/Source/WebCore/ChangeLog
r270065 r270067 1 2020-11-19 Ada Chan <adachan@apple.com> 2 3 Turn on ENABLE_WEBXR for Cocoa 4 https://bugs.webkit.org/show_bug.cgi?id=219171 5 6 Reviewed by Tim Horton. 7 8 * Modules/webxr/WebXRRigidTransform.h: 9 * Modules/webxr/WebXRSystem.h: 10 * Modules/webxr/WebXRView.h: 11 * Modules/webxr/XREye.idl: 12 * Modules/webxr/XRHandedness.idl: 13 * Modules/webxr/XRReferenceSpaceType.idl: 14 * Modules/webxr/XRSessionMode.idl: 15 * Modules/webxr/XRTargetRayMode.idl: 16 * Modules/webxr/XRVisibilityState.idl: 17 * SourcesCocoa.txt: 18 * WebCore.xcodeproj/project.pbxproj: 19 * bindings/js/JSCallbackData.h: 20 * dom/ActiveDOMCallback.h: 21 * platform/xr/cocoa/PlatformXRCocoa.cpp: Copied from Source/WebCore/Modules/webxr/XRTargetRayMode.idl. 22 * platform/xr/cocoa/PlatformXRCocoa.h: Copied from Source/WebCore/Modules/webxr/XREye.idl. 23 * platform/xr/openxr/PlatformXROpenXR.cpp: 24 (PlatformXR::Instance::Impl::queue const): 25 (PlatformXR::Instance::Impl::checkInstanceExtensionProperties const): 26 (PlatformXR::Instance::Impl::Impl): 27 (PlatformXR::Instance::Impl::~Impl): 28 (PlatformXR::Instance::enumerateImmersiveXRDevices): 29 * platform/xr/openxr/PlatformXROpenXR.h: 30 1 31 2020-11-19 Aditya Keerthi <akeerthi@apple.com> 2 32 -
trunk/Source/WebCore/Modules/webxr/WebXRRigidTransform.h
r258498 r270067 39 39 40 40 class WebXRRigidTransform : public RefCounted<WebXRRigidTransform> { 41 WTF_MAKE_ISO_ALLOCATED (WebXRRigidTransform);41 WTF_MAKE_ISO_ALLOCATED_EXPORT(WebXRRigidTransform, WEBCORE_EXPORT); 42 42 public: 43 43 static Ref<WebXRRigidTransform> create(); 44 static ExceptionOr<Ref<WebXRRigidTransform>> create(const DOMPointInit&, const DOMPointInit&);45 ~WebXRRigidTransform();44 WEBCORE_EXPORT static ExceptionOr<Ref<WebXRRigidTransform>> create(const DOMPointInit&, const DOMPointInit&); 45 WEBCORE_EXPORT ~WebXRRigidTransform(); 46 46 47 47 const DOMPointReadOnly& position() const; -
trunk/Source/WebCore/Modules/webxr/WebXRSystem.h
r268255 r270067 76 76 77 77 // For testing purpouses only. 78 void registerSimulatedXRDeviceForTesting(PlatformXR::Device&);79 void unregisterSimulatedXRDeviceForTesting(PlatformXR::Device&);78 WEBCORE_EXPORT void registerSimulatedXRDeviceForTesting(PlatformXR::Device&); 79 WEBCORE_EXPORT void unregisterSimulatedXRDeviceForTesting(PlatformXR::Device&); 80 80 81 81 protected: -
trunk/Source/WebCore/Modules/webxr/WebXRView.h
r260884 r270067 41 41 42 42 class WebXRView : public RefCounted<WebXRView> { 43 WTF_MAKE_ISO_ALLOCATED (WebXRView);43 WTF_MAKE_ISO_ALLOCATED_EXPORT(WebXRView, WEBCORE_EXPORT); 44 44 public: 45 static Ref<WebXRView> create();46 ~WebXRView();45 WEBCORE_EXPORT static Ref<WebXRView> create(); 46 WEBCORE_EXPORT ~WebXRView(); 47 47 48 48 XREye eye() const { return m_eye; } … … 51 51 52 52 void setEye(XREye eye) { m_eye = eye; } 53 void setProjectionMatrix(const Vector<float>&);53 WEBCORE_EXPORT void setProjectionMatrix(const Vector<float>&); 54 54 void setTransform(RefPtr<WebXRRigidTransform>&& viewOffset) { m_transform = WTFMove(viewOffset); } 55 55 -
trunk/Source/WebCore/Modules/webxr/XREye.idl
r258498 r270067 26 26 [ 27 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 28 Conditional=WEBXR, 29 ExportMacro=WEBCORE_EXPORT 29 30 ] enum XREye { 30 31 "none", -
trunk/Source/WebCore/Modules/webxr/XRHandedness.idl
r258498 r270067 26 26 [ 27 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 28 Conditional=WEBXR, 29 ExportMacro=WEBCORE_EXPORT 29 30 ] enum XRHandedness { 30 31 "none", -
trunk/Source/WebCore/Modules/webxr/XRReferenceSpaceType.idl
r258498 r270067 26 26 [ 27 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 28 Conditional=WEBXR, 29 ExportMacro=WEBCORE_EXPORT 29 30 ] enum XRReferenceSpaceType { 30 31 "viewer", -
trunk/Source/WebCore/Modules/webxr/XRSessionMode.idl
r258498 r270067 26 26 [ 27 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 28 Conditional=WEBXR, 29 ExportMacro=WEBCORE_EXPORT 29 30 ] enum XRSessionMode { 30 31 "inline", -
trunk/Source/WebCore/Modules/webxr/XRTargetRayMode.idl
r258498 r270067 26 26 [ 27 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 28 Conditional=WEBXR, 29 ExportMacro=WEBCORE_EXPORT 29 30 ] enum XRTargetRayMode { 30 31 "gaze", -
trunk/Source/WebCore/Modules/webxr/XRVisibilityState.idl
r258498 r270067 26 26 [ 27 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 28 Conditional=WEBXR, 29 ExportMacro=WEBCORE_EXPORT 29 30 ] enum XRVisibilityState { 30 31 "visible", -
trunk/Source/WebCore/SourcesCocoa.txt
r269830 r270067 588 588 platform/text/mac/TextCheckingMac.mm 589 589 platform/text/mac/TextEncodingRegistryMac.mm 590 platform/xr/cocoa/PlatformXRCocoa.cpp 590 591 rendering/RenderThemeCocoa.mm 591 592 rendering/RenderThemeIOS.mm -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r270023 r270067 1600 1600 51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB5502113E3E9100821176 /* JSCloseEvent.h */; }; 1601 1601 51FB67DC1AE6B82F00D06C5A /* ContentExtensionStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB67DA1AE6B5E400D06C5A /* ContentExtensionStyleSheet.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1602 5273CC77256103CF00850007 /* PlatformXRCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 5273CC75256103CF00850007 /* PlatformXRCocoa.h */; }; 1603 5273CC8E25637EB500850007 /* WebXRTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18D83E0243F71CE009247D6 /* WebXRTest.cpp */; }; 1604 5273CC9025637F6700850007 /* WebFakeXRDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18D83E9243F71D3009247D6 /* WebFakeXRDevice.cpp */; }; 1605 5273CC9125637F7500850007 /* WebFakeXRInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18D83DD243F71CC009247D6 /* WebFakeXRInputController.cpp */; }; 1606 5273CC9C2563B25A00850007 /* JSWebXRTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CC9A2563B21200850007 /* JSWebXRTest.cpp */; }; 1607 5273CCA02563B37700850007 /* JSWebFakeXRDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CC9E2563B37600850007 /* JSWebFakeXRDevice.cpp */; }; 1608 5273CCA42563B4F800850007 /* JSXRSimulateUserActivationFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCA22563B4F700850007 /* JSXRSimulateUserActivationFunction.cpp */; }; 1609 5273CCA82563B5CA00850007 /* JSWebFakeXRInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCA62563B5C900850007 /* JSWebFakeXRInputController.cpp */; }; 1610 5273CCB02564576F00850007 /* JSFakeXRInputSourceInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCAA2564576B00850007 /* JSFakeXRInputSourceInit.cpp */; }; 1611 5273CCB12564576F00850007 /* JSFakeXRBoundsPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCAC2564576C00850007 /* JSFakeXRBoundsPoint.cpp */; }; 1612 5273CCB22564576F00850007 /* JSFakeXRButtonStateInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCAD2564576C00850007 /* JSFakeXRButtonStateInit.cpp */; }; 1613 5273CCB32564576F00850007 /* JSFakeXRRigidTransformInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCAE2564576D00850007 /* JSFakeXRRigidTransformInit.cpp */; }; 1614 5273CCB42564576F00850007 /* JSFakeXRViewInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5273CCAF2564576E00850007 /* JSFakeXRViewInit.cpp */; }; 1602 1615 52B0D4BE1C57FD1E0077CE53 /* PlatformView.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4BD1C57FD1E0077CE53 /* PlatformView.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1603 1616 52B0D4C01C57FD660077CE53 /* VideoFullscreenChangeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4BF1C57FD660077CE53 /* VideoFullscreenChangeObserver.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 8828 8841 526B3F0122FB7BDD0076D37D /* WHLSLPruneUnreachableStandardLibraryFunctions.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLPruneUnreachableStandardLibraryFunctions.cpp; sourceTree = "<group>"; }; 8829 8842 526B3F0322FB7BDE0076D37D /* WHLSLPruneUnreachableStandardLibraryFunctions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLPruneUnreachableStandardLibraryFunctions.h; sourceTree = "<group>"; }; 8843 5273CC74256103CF00850007 /* PlatformXRCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformXRCocoa.cpp; sourceTree = "<group>"; }; 8844 5273CC75256103CF00850007 /* PlatformXRCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformXRCocoa.h; sourceTree = "<group>"; }; 8845 5273CC9A2563B21200850007 /* JSWebXRTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebXRTest.cpp; sourceTree = "<group>"; }; 8846 5273CC9E2563B37600850007 /* JSWebFakeXRDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebFakeXRDevice.cpp; sourceTree = "<group>"; }; 8847 5273CCA22563B4F700850007 /* JSXRSimulateUserActivationFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXRSimulateUserActivationFunction.cpp; sourceTree = "<group>"; }; 8848 5273CCA62563B5C900850007 /* JSWebFakeXRInputController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebFakeXRInputController.cpp; sourceTree = "<group>"; }; 8849 5273CCAA2564576B00850007 /* JSFakeXRInputSourceInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRInputSourceInit.cpp; sourceTree = "<group>"; }; 8850 5273CCAC2564576C00850007 /* JSFakeXRBoundsPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRBoundsPoint.cpp; sourceTree = "<group>"; }; 8851 5273CCAD2564576C00850007 /* JSFakeXRButtonStateInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRButtonStateInit.cpp; sourceTree = "<group>"; }; 8852 5273CCAE2564576D00850007 /* JSFakeXRRigidTransformInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRRigidTransformInit.cpp; sourceTree = "<group>"; }; 8853 5273CCAF2564576E00850007 /* JSFakeXRViewInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFakeXRViewInit.cpp; sourceTree = "<group>"; }; 8830 8854 52914C2A22F93E4E00578150 /* WHLSLParsingMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLParsingMode.h; sourceTree = "<group>"; }; 8831 8855 52914C2C22F93E5D00578150 /* WHLSLAddressEscapeMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLAddressEscapeMode.h; sourceTree = "<group>"; }; … … 19339 19363 isa = PBXGroup; 19340 19364 children = ( 19365 5273CCAC2564576C00850007 /* JSFakeXRBoundsPoint.cpp */, 19366 5273CCAD2564576C00850007 /* JSFakeXRButtonStateInit.cpp */, 19367 5273CCAA2564576B00850007 /* JSFakeXRInputSourceInit.cpp */, 19368 5273CCAE2564576D00850007 /* JSFakeXRRigidTransformInit.cpp */, 19369 5273CCAF2564576E00850007 /* JSFakeXRViewInit.cpp */, 19341 19370 51714EAE1CF6654A004723C4 /* JSGCObservation.cpp */, 19342 19371 51714EAF1CF6654A004723C4 /* JSGCObservation.h */, … … 19374 19403 EBF5121A1696496C0056BD25 /* JSTypeConversions.cpp */, 19375 19404 EBF5121B1696496C0056BD25 /* JSTypeConversions.h */, 19405 5273CC9E2563B37600850007 /* JSWebFakeXRDevice.cpp */, 19406 5273CCA62563B5C900850007 /* JSWebFakeXRInputController.cpp */, 19407 5273CC9A2563B21200850007 /* JSWebXRTest.cpp */, 19408 5273CCA22563B4F700850007 /* JSXRSimulateUserActivationFunction.cpp */, 19376 19409 ); 19377 19410 name = Testing; … … 20563 20596 ); 20564 20597 path = service; 20598 sourceTree = "<group>"; 20599 }; 20600 5273CC722561039B00850007 /* cocoa */ = { 20601 isa = PBXGroup; 20602 children = ( 20603 5273CC74256103CF00850007 /* PlatformXRCocoa.cpp */, 20604 5273CC75256103CF00850007 /* PlatformXRCocoa.h */, 20605 ); 20606 path = cocoa; 20565 20607 sourceTree = "<group>"; 20566 20608 }; … … 28590 28632 isa = PBXGroup; 28591 28633 children = ( 28634 5273CC722561039B00850007 /* cocoa */, 28592 28635 E1EE8B6D2412B2A700E794D6 /* openxr */, 28593 28636 E1EE8B6F2412B2A700E794D6 /* PlatformXR.h */, … … 33834 33877 935C476B09AC4D4F00A6AAB4 /* PlatformWheelEvent.h in Headers */, 33835 33878 E1EE8B722412B2A800E794D6 /* PlatformXR.h in Headers */, 33879 5273CC77256103CF00850007 /* PlatformXRCocoa.h in Headers */, 33836 33880 E1C1A39E2480080800E0AF66 /* PlatformXROpenXR.h in Headers */, 33837 33881 712BE4801FE864A7002031CC /* PlaybackDirection.h in Headers */, … … 35664 35708 4136C57A2398E5BE002497D3 /* InternalsMapLike.cpp in Sources */, 35665 35709 4136EC0C23838870000ADBCE /* InternalsSetLike.cpp in Sources */, 35710 5273CCB12564576F00850007 /* JSFakeXRBoundsPoint.cpp in Sources */, 35711 5273CCB22564576F00850007 /* JSFakeXRButtonStateInit.cpp in Sources */, 35712 5273CCB02564576F00850007 /* JSFakeXRInputSourceInit.cpp in Sources */, 35713 5273CCB32564576F00850007 /* JSFakeXRRigidTransformInit.cpp in Sources */, 35714 5273CCB42564576F00850007 /* JSFakeXRViewInit.cpp in Sources */, 35666 35715 DE5F86121FA239E7006DB63A /* JSGCObservation.cpp in Sources */, 35667 35716 417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */, … … 35683 35732 427DA71D13735DFA007C57FB /* JSServiceWorkerInternals.cpp in Sources */, 35684 35733 EBF5121C1696496C0056BD25 /* JSTypeConversions.cpp in Sources */, 35734 5273CCA02563B37700850007 /* JSWebFakeXRDevice.cpp in Sources */, 35735 5273CCA82563B5CA00850007 /* JSWebFakeXRInputController.cpp in Sources */, 35736 5273CC9C2563B25A00850007 /* JSWebXRTest.cpp in Sources */, 35737 5273CCA42563B4F800850007 /* JSXRSimulateUserActivationFunction.cpp in Sources */, 35685 35738 CDC26B40160A8CC60026757B /* LegacyMockCDM.cpp in Sources */, 35686 35739 A1E086632489D34E00E496D9 /* MockApplePaySetupFeature.cpp in Sources */, … … 35701 35754 DE7710861FA2F0D600460016 /* WebArchiveDumpSupport.mm in Sources */, 35702 35755 41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */, 35756 5273CC9025637F6700850007 /* WebFakeXRDevice.cpp in Sources */, 35757 5273CC9125637F7500850007 /* WebFakeXRInputController.cpp in Sources */, 35758 5273CC8E25637EB500850007 /* WebXRTest.cpp in Sources */, 35703 35759 ); 35704 35760 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/bindings/js/JSCallbackData.h
r268365 r270067 63 63 } 64 64 65 static JSC::JSValue invokeCallback(JSDOMGlobalObject&, JSC::JSObject* callback, JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&, CallbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException);65 WEBCORE_EXPORT static JSC::JSValue invokeCallback(JSDOMGlobalObject&, JSC::JSObject* callback, JSC::JSValue thisValue, JSC::MarkedArgumentBuffer&, CallbackType, JSC::PropertyName functionName, NakedPtr<JSC::Exception>& returnedException); 66 66 67 67 private: -
trunk/Source/WebCore/dom/ActiveDOMCallback.h
r252263 r270067 48 48 class ActiveDOMCallback : public ContextDestructionObserver { 49 49 public: 50 ActiveDOMCallback(ScriptExecutionContext*);51 virtual ~ActiveDOMCallback();50 WEBCORE_EXPORT ActiveDOMCallback(ScriptExecutionContext*); 51 WEBCORE_EXPORT virtual ~ActiveDOMCallback(); 52 52 53 53 WEBCORE_EXPORT bool canInvokeCallback() const; -
trunk/Source/WebCore/platform/xr/cocoa/PlatformXRCocoa.cpp
r270066 r270067 1 1 /* 2 * Copyright (C) 2020 Igalia S.L. All rights reserved.2 * Copyright (C) 2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 29 ] enum XRSessionMode { 30 "inline", 31 "immersive-vr", 32 "immersive-ar" 33 }; 26 #include "config.h" 27 #include "PlatformXRCocoa.h" 28 29 #if ENABLE(WEBXR) && PLATFORM(COCOA) 30 31 #include <WebKitAdditions/PlatformXRAdditions.cpp> 32 33 #endif -
trunk/Source/WebCore/platform/xr/cocoa/PlatformXRCocoa.h
r270066 r270067 1 1 /* 2 * Copyright (C) 2020 Igalia S.L. All rights reserved.2 * Copyright (C) 2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 EnabledAtRuntime=WebXR, 28 Conditional=WEBXR 29 ] enum XREye { 30 "none", 31 "left", 32 "right" 33 }; 26 #pragma once 27 28 #if ENABLE(WEBXR) && PLATFORM(COCOA) 29 30 #include <WebKitAdditions/PlatformXRAdditions.h> 31 32 #endif -
trunk/Source/WebCore/platform/xr/openxr/PlatformXROpenXR.cpp
r269032 r270067 21 21 #include "PlatformXROpenXR.h" 22 22 23 #if ENABLE(WEBXR) 23 #if ENABLE(WEBXR) && USE(OPENXR) 24 24 25 25 #include "Logging.h" 26 #if USE_OPENXR27 26 #include <openxr/openxr_platform.h> 28 27 #include <wtf/Optional.h> … … 30 29 #include <wtf/text/StringConcatenateNumbers.h> 31 30 #include <wtf/text/WTFString.h> 32 #endif // USE_OPENXR33 31 #include <wtf/NeverDestroyed.h> 34 32 … … 36 34 37 35 namespace PlatformXR { 38 39 #if USE_OPENXR40 36 41 37 template<typename T, XrStructureType StructureType> … … 64 60 } \ 65 61 66 #endif // USE_OPENXR67 68 62 struct Instance::Impl { 69 63 WTF_MAKE_FAST_ALLOCATED; … … 72 66 ~Impl(); 73 67 74 #if USE_OPENXR75 68 XrInstance xrInstance() const { return m_instance; } 76 69 WorkQueue& queue() const { return m_workQueue; } 77 #endif78 70 79 71 private: 80 #if USE_OPENXR81 72 void enumerateApiLayerProperties() const; 82 73 bool checkInstanceExtensionProperties() const; … … 84 75 XrInstance m_instance { XR_NULL_HANDLE }; 85 76 Ref<WorkQueue> m_workQueue; 86 #endif // USE_OPENXR87 77 }; 88 78 89 #if USE_OPENXR90 79 void Instance::Impl::enumerateApiLayerProperties() const 91 80 { … … 156 145 return true; 157 146 } 158 #endif // USE_OPENXR159 147 160 148 Instance::Impl::Impl() 161 #if USE_OPENXR162 149 : m_workQueue(WorkQueue::create("OpenXR queue")) 163 #endif 164 { 165 #if USE_OPENXR 150 { 166 151 m_workQueue->dispatch([this]() { 167 152 LOG(XR, "OpenXR: initializing\n"); … … 194 179 LOG(XR, "xrCreateInstance(): using instance %p\n", m_instance); 195 180 }); 196 #endif // USE_OPENXR197 181 } 198 182 199 183 Instance::Impl::~Impl() 200 184 { 201 #if USE_OPENXR202 185 m_workQueue->dispatch([this] { 203 186 if (m_instance != XR_NULL_HANDLE) 204 187 xrDestroyInstance(m_instance); 205 188 }); 206 #endif207 189 } 208 190 … … 225 207 void Instance::enumerateImmersiveXRDevices(CompletionHandler<void(const DeviceList& devices)>&& callback) 226 208 { 227 #if USE_OPENXR228 209 m_impl->queue().dispatch([this, callback = WTFMove(callback)]() mutable { 229 210 auto callbackOnExit = makeScopeExit([&]() { … … 254 235 }); 255 236 }); 256 257 #endif // USE_OPENXR 258 } 259 260 #if USE_OPENXR 237 } 238 261 239 OpenXRDevice::OpenXRDevice(XrSystemId id, XrInstance instance, WorkQueue& queue, CompletionHandler<void()>&& callback) 262 240 : m_systemId(id) … … 400 378 } 401 379 402 #endif // USE_OPENXR403 404 380 } // namespace PlatformXR 405 381 406 #endif // ENABLE(WEBXR) 382 #endif // ENABLE(WEBXR) && USE(OPENXR) -
trunk/Source/WebCore/platform/xr/openxr/PlatformXROpenXR.h
r269032 r270067 20 20 #pragma once 21 21 22 #if ENABLE(WEBXR) 22 #if ENABLE(WEBXR) && USE(OPENXR) 23 23 #include "PlatformXR.h" 24 24 25 25 #include <wtf/HashMap.h> 26 26 27 #if USE_OPENXR28 27 #include <openxr/openxr.h> 29 28 #include <wtf/WorkQueue.h> … … 70 69 } // namespace PlatformXR 71 70 72 #endif // USE_OPENXR 73 #endif // ENABLE(WEBXR) 71 #endif // ENABLE(WEBXR) && USE(OPENXR)
Note: See TracChangeset
for help on using the changeset viewer.