Unreviewed build fix.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2018 23:38:29 +0000 (23:38 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2018 23:38:29 +0000 (23:38 +0000)
Those enum value names were too generic and would cause conflicts.

* Modules/webvr/VRDisplayCapabilities.h:
(WebCore::VRDisplayCapabilities::hasPosition const):
(WebCore::VRDisplayCapabilities::hasOrientation const):
(WebCore::VRDisplayCapabilities::hasExternalDisplay const):
(WebCore::VRDisplayCapabilities::canPresent const):
* platform/vr/VRPlatformDisplay.h:
* platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
(WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/webvr/VRDisplayCapabilities.h
Source/WebCore/platform/vr/VRPlatformDisplay.h
Source/WebCore/platform/vr/openvr/VRPlatformDisplayOpenVR.cpp

index db6561c..15cacc5 100644 (file)
@@ -1,5 +1,20 @@
 2018-04-10  Chris Dumez  <cdumez@apple.com>
 
+        Unreviewed build fix.
+
+        Those enum value names were too generic and would cause conflicts.
+
+        * Modules/webvr/VRDisplayCapabilities.h:
+        (WebCore::VRDisplayCapabilities::hasPosition const):
+        (WebCore::VRDisplayCapabilities::hasOrientation const):
+        (WebCore::VRDisplayCapabilities::hasExternalDisplay const):
+        (WebCore::VRDisplayCapabilities::canPresent const):
+        * platform/vr/VRPlatformDisplay.h:
+        * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
+        (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
+
+2018-04-10  Chris Dumez  <cdumez@apple.com>
+
         Avoid constructing a service worker RegistrationStore for private sessions
         https://bugs.webkit.org/show_bug.cgi?id=184463
         <rdar://problem/36613948>
index aa3f3ea..8f64ab4 100644 (file)
@@ -39,10 +39,10 @@ public:
         return adoptRef(*new VRDisplayCapabilities(capabilityFlags));
     }
 
-    bool hasPosition() const { return m_flags & VRDisplayCapabilityFlag::Position; }
-    bool hasOrientation() const { return m_flags & VRDisplayCapabilityFlag::Orientation; }
-    bool hasExternalDisplay() const { return m_flags & VRDisplayCapabilityFlag::ExternalDisplay; }
-    bool canPresent() const { return m_flags & VRDisplayCapabilityFlag::Present; }
+    bool hasPosition() const { return m_flags & VRDisplayCapabilityFlagPosition; }
+    bool hasOrientation() const { return m_flags & VRDisplayCapabilityFlagOrientation; }
+    bool hasExternalDisplay() const { return m_flags & VRDisplayCapabilityFlagExternalDisplay; }
+    bool canPresent() const { return m_flags & VRDisplayCapabilityFlagPresent; }
     unsigned maxLayer() const { return canPresent() ? 1 : 0; }
 
 private:
index 998b37d..762325c 100644 (file)
@@ -31,11 +31,11 @@ namespace WebCore {
 typedef unsigned VRDisplayCapabilityFlags;
 
 enum VRDisplayCapabilityFlag {
-    None = 0,
-    Position = 1 << 1,
-    Orientation = 1 << 2,
-    ExternalDisplay = 1 << 3,
-    Present = 1 << 4
+    VRDisplayCapabilityFlagNone = 0,
+    VRDisplayCapabilityFlagPosition = 1 << 1,
+    VRDisplayCapabilityFlagOrientation = 1 << 2,
+    VRDisplayCapabilityFlagExternalDisplay = 1 << 3,
+    VRDisplayCapabilityFlagPresent = 1 << 4
 };
 
 /* The purpose of this class is to encapsulate all the info about the display in a single class/data
index fadb6fc..dd6288e 100644 (file)
@@ -48,7 +48,7 @@ VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR(vr::IVRSystem* system, vr::IVRC
     m_displayInfo.setDisplayName(stringBuilder.toString());
     m_displayInfo.setIsMounted(false);
     // FIXME: We're assuming an HTC Vive HMD here. Get this info from OpenVR?.
-    m_displayInfo.setCapabilityFlags(VRDisplayCapabilityFlag::None | VRDisplayCapabilityFlag::Position | VRDisplayCapabilityFlag::Orientation | VRDisplayCapabilityFlag::ExternalDisplay | VRDisplayCapabilityFlag::Present);
+    m_displayInfo.setCapabilityFlags(VRDisplayCapabilityFlagNone | VRDisplayCapabilityFlagPosition | VRDisplayCapabilityFlagOrientation | VRDisplayCapabilityFlagExternalDisplay | VRDisplayCapabilityFlagPresent);
 
     m_compositor->SetTrackingSpace(vr::TrackingUniverseSeated);