Bug 1299928 - Part 2: Rename VRDisplayType to VRDeviceType; r=kip
authorDaosheng Mu <daoshengmu@gmail.com>
Tue, 04 Oct 2016 16:22:42 +0800
changeset 363309 2ad2da73d53acded8d280e59a7d4fb27320ed1ca
parent 363308 cf68c36df030b2ed0f0dd65199a681e7b6fef74f
child 363310 16414aeacf43c81fbccf15578bbf03712a9c3431
push id1369
push userjlorenzo@mozilla.com
push dateMon, 27 Feb 2017 14:59:41 +0000
treeherdermozilla-release@d75a1dba431f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip
bugs1299928
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1299928 - Part 2: Rename VRDisplayType to VRDeviceType; r=kip MozReview-Commit-ID: IZ1eJUtBeRI
gfx/vr/VRDisplayHost.cpp
gfx/vr/VRDisplayHost.h
gfx/vr/gfxVR.h
gfx/vr/gfxVROSVR.cpp
gfx/vr/gfxVROculus.cpp
gfx/vr/gfxVROpenVR.cpp
gfx/vr/ipc/VRMessageUtils.h
--- a/gfx/vr/VRDisplayHost.cpp
+++ b/gfx/vr/VRDisplayHost.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/layers/TextureD3D11.h"
 
 #endif
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 
-VRDisplayHost::VRDisplayHost(VRDisplayType aType)
+VRDisplayHost::VRDisplayHost(VRDeviceType aType)
   : mInputFrameID(0)
 {
   MOZ_COUNT_CTOR(VRDisplayHost);
   mDisplayInfo.mType = aType;
   mDisplayInfo.mDisplayID = VRDisplayManager::AllocateDisplayID();
   mDisplayInfo.mIsPresenting = false;
 
   for (int i = 0; i < kMaxLatencyFrames; i++) {
--- a/gfx/vr/VRDisplayHost.h
+++ b/gfx/vr/VRDisplayHost.h
@@ -47,17 +47,17 @@ public:
                    const int32_t& aInputFrameID,
                    mozilla::layers::PTextureParent* aTexture,
                    const gfx::Rect& aLeftEyeRect,
                    const gfx::Rect& aRightEyeRect);
 
   bool CheckClearDisplayInfoDirty();
 
 protected:
-  explicit VRDisplayHost(VRDisplayType aType);
+  explicit VRDisplayHost(VRDeviceType aType);
   virtual ~VRDisplayHost();
 
 #if defined(XP_WIN)
   virtual void SubmitFrame(mozilla::layers::TextureSourceD3D11* aSource,
                            const IntSize& aSize,
                            const VRHMDSensorState& aSensorState,
                            const gfx::Rect& aLeftEyeRect,
                            const gfx::Rect& aRightEyeRect) = 0;
--- a/gfx/vr/gfxVR.h
+++ b/gfx/vr/gfxVR.h
@@ -19,21 +19,21 @@
 namespace mozilla {
 namespace layers {
 class PTextureParent;
 }
 namespace gfx {
 class VRLayerParent;
 class VRDisplayHost;
 
-enum class VRDisplayType : uint16_t {
+enum class VRDeviceType : uint16_t {
   Oculus,
   OpenVR,
   OSVR,
-  NumVRDisplayTypes
+  NumVRDeviceTypes
 };
 
 enum class VRDisplayCapabilityFlags : uint16_t {
   Cap_None = 0,
   /**
    * Cap_Position is set if the VRDisplay is capable of tracking its position.
    */
   Cap_Position = 1 << 1,
@@ -117,17 +117,17 @@ struct VRFieldOfView {
   double upDegrees;
   double rightDegrees;
   double downDegrees;
   double leftDegrees;
 };
 
 struct VRDisplayInfo
 {
-  VRDisplayType GetType() const { return mType; }
+  VRDeviceType GetType() const { return mType; }
   uint32_t GetDisplayID() const { return mDisplayID; }
   const nsCString& GetDisplayName() const { return mDisplayName; }
   VRDisplayCapabilityFlags GetCapabilities() const { return mCapabilityFlags; }
 
   const IntSize& SuggestedEyeResolution() const { return mEyeResolution; }
   const Point3D& GetEyeTranslation(uint32_t whichEye) const { return mEyeTranslation[whichEye]; }
   const VRFieldOfView& GetEyeFOV(uint32_t whichEye) const { return mEyeFOV[whichEye]; }
   bool GetIsConnected() const { return mIsConnected; }
@@ -137,17 +137,17 @@ struct VRDisplayInfo
 
   enum Eye {
     Eye_Left,
     Eye_Right,
     NumEyes
   };
 
   uint32_t mDisplayID;
-  VRDisplayType mType;
+  VRDeviceType mType;
   nsCString mDisplayName;
   VRDisplayCapabilityFlags mCapabilityFlags;
   VRFieldOfView mEyeFOV[VRDisplayInfo::NumEyes];
   Point3D mEyeTranslation[VRDisplayInfo::NumEyes];
   IntSize mEyeResolution;
   bool mIsConnected;
   bool mIsPresenting;
   Size mStageSize;
--- a/gfx/vr/gfxVROSVR.cpp
+++ b/gfx/vr/gfxVROSVR.cpp
@@ -198,17 +198,17 @@ SetFromTanRadians(double left, double ri
   fovInfo.upDegrees = atan(top) * 180.0 / M_PI;
   fovInfo.downDegrees = atan(bottom) * 180.0 / M_PI;
   return fovInfo;
 }
 
 VRDisplayOSVR::VRDisplayOSVR(OSVR_ClientContext* context,
                          OSVR_ClientInterface* iface,
                          OSVR_DisplayConfig* display)
-  : VRDisplayHost(VRDisplayType::OSVR)
+  : VRDisplayHost(VRDeviceType::OSVR)
   , m_ctx(context)
   , m_iface(iface)
   , m_display(display)
 {
 
   MOZ_COUNT_CTOR_INHERITED(VRDisplayOSVR, VRDisplayHost);
 
   mDisplayInfo.mIsConnected = true;
--- a/gfx/vr/gfxVROculus.cpp
+++ b/gfx/vr/gfxVROculus.cpp
@@ -310,17 +310,17 @@ FromFovPort(const ovrFovPort& aFOV)
   fovInfo.upDegrees = atan(aFOV.UpTan) * 180.0 / M_PI;
   fovInfo.downDegrees = atan(aFOV.DownTan) * 180.0 / M_PI;
   return fovInfo;
 }
 
 } // namespace
 
 VRDisplayOculus::VRDisplayOculus(ovrSession aSession)
-  : VRDisplayHost(VRDisplayType::Oculus)
+  : VRDisplayHost(VRDeviceType::Oculus)
   , mSession(aSession)
   , mTextureSet(nullptr)
   , mQuadVS(nullptr)
   , mQuadPS(nullptr)
   , mLinearSamplerState(nullptr)
   , mVSConstantBuffer(nullptr)
   , mPSConstantBuffer(nullptr)
   , mVertexBuffer(nullptr)
--- a/gfx/vr/gfxVROpenVR.cpp
+++ b/gfx/vr/gfxVROpenVR.cpp
@@ -80,17 +80,17 @@ LoadOpenVRRuntime()
 #undef REQUIRE_FUNCTION
 
   return true;
 }
 
 VRDisplayOpenVR::VRDisplayOpenVR(::vr::IVRSystem *aVRSystem,
                                  ::vr::IVRChaperone *aVRChaperone,
                                  ::vr::IVRCompositor *aVRCompositor)
-  : VRDisplayHost(VRDisplayType::OpenVR)
+  : VRDisplayHost(VRDeviceType::OpenVR)
   , mVRSystem(aVRSystem)
   , mVRChaperone(aVRChaperone)
   , mVRCompositor(aVRCompositor)
   , mIsPresenting(false)
 {
   MOZ_COUNT_CTOR_INHERITED(VRDisplayOpenVR, VRDisplayHost);
 
   mDisplayInfo.mDisplayName.AssignLiteral("OpenVR HMD");
--- a/gfx/vr/ipc/VRMessageUtils.h
+++ b/gfx/vr/ipc/VRMessageUtils.h
@@ -11,20 +11,20 @@
 #include "mozilla/GfxMessageUtils.h"
 #include "VRManager.h"
 
 #include "gfxVR.h"
 
 namespace IPC {
 
 template<>
-struct ParamTraits<mozilla::gfx::VRDisplayType> :
-  public ContiguousEnumSerializer<mozilla::gfx::VRDisplayType,
-                                  mozilla::gfx::VRDisplayType(0),
-                                  mozilla::gfx::VRDisplayType(mozilla::gfx::VRDisplayType::NumVRDisplayTypes)> {};
+struct ParamTraits<mozilla::gfx::VRDeviceType> :
+  public ContiguousEnumSerializer<mozilla::gfx::VRDeviceType,
+                                  mozilla::gfx::VRDeviceType(0),
+                                  mozilla::gfx::VRDeviceType(mozilla::gfx::VRDeviceType::NumVRDeviceTypes)> {};
 
 template<>
 struct ParamTraits<mozilla::gfx::VRDisplayCapabilityFlags> :
   public BitFlagsEnumSerializer<mozilla::gfx::VRDisplayCapabilityFlags,
                                 mozilla::gfx::VRDisplayCapabilityFlags::Cap_All> {};
 
 template <>
 struct ParamTraits<mozilla::gfx::VRDisplayInfo>